Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Apr 23 '12 at 2:34

This question came from our site for professional and enthusiast programmers.

    
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
add comment

2 Answers

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.

share|improve this answer
    
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
add comment

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)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.