lundi 5 janvier 2015

Is there a similar functionality of "Get Info" (Cmd+I) from the Mac OS X Terminal.app?


I would like to ask if in OS X there is a similar functionality of "Get Info" (Cmd+I) but from the Mac OS X Terminal.app? I mean something like finderGetInfo /path/to/a/file.ext which will output the infos for the file but in the terminal console? Like this:


enter image description here


But from the command line:



Machine:~ antony$ finderGetInfo /Users/antony/file.ext
General:
Kind: Document
Size: 29 bytes (4 KB on disk)
Where: /Users/antony
Created: Today 08:58
Modified: Today 08:58
Stationery pad: NO
Locked: NO
More Info:
--
Name & Extension: file.ext
Comments: ...
etc...


It would be very useful when creating some automatic tools that need to extrapolate some useful information from a file of any type.


Is it possible in OS X?





Aucun commentaire:

Enregistrer un commentaire