I need to view via terminal in what program the file was created.

Something like :

$ "command" /Volumes/USB1/IMG_0231.jpg

Creator = "Adobe Photoshop Elements 3.0 Macintosh".

Any thoughts?

  • Not only impossible in general, but also offtopic. – Let_Me_Be Apr 21 '12 at 12:41
  • if you're thinking specifcally about jpg files, it might be possible. Generally, to the level of detail you're describing, you'll have to write your own program. Unix/Linux does have the file filename utility, which will output a generic description, like 'shell script', 'c program', 'text data', etc. Good luck. – shellter Apr 21 '12 at 12:42
  • there's no general purpose utility for doing this!! files doesn' hold the creator program descriptors...except images or so.. – Vineet Menon Apr 23 '12 at 12:42

In general this is not possible, because the program that makes the file should integrate this information (metadata). And this may not be the case with every program/device/file type.

For file types such as JPEG, made produced by a camera, there is an exif wikipedia data, which can contain quite a lot - geolocation, model, exposure, etc. But if you make a jpeg file, you are responsible for the information. And you may leave it blank.

Another example are the files which contain only text - *.txt, *.sh, *.c, *.cpp etc. They contain only text, and not an additional metadata.

  • I am focused on .eps files. For example , if i clicks right mouse button on this file, I can see information about program in which the file was created. That is why , i think, this information is stored somewhere. – IronarnI11 Apr 21 '12 at 20:38
  • this may help you - sentex.net/~mwandel/jhead – Bakudan Apr 22 '12 at 12:16

with eps-files you might have success with something like

sed -e '/^%%Creator:/!d' -e 's/^%%Creator: *//' MYFILE.EPS

this is will only work with EPS-files (and only those that actually have the Creator field set)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy