in reply to file(1) equivalent?
For modules, see File::MMagic and File::LibMagic and File::Mimeinfo.