Terminal ls command argument(s) to list file properties

Terminal newbie here, using OS X 10.11.6 and learning the basics.


Are there arguments that can be added to the ls list command, to yield a list with resource-fork attributes? I'm thinking specifically of file creation dates. I want a text output that I could parse into a spreadsheet (that i can do!) to create charts of 'activity', with files creation as a proxy for 'activity'. But i can see other attributes like file size, kind, being useful too.


Thanks All,

Mac Pro, OS X 10.11

Posted on Aug 13, 2022 5:14 PM

Reply
4 replies

Aug 14, 2022 1:03 PM in response to Angus McC

/bin/ls -leO@ will display most of the metadata attached to a file


/bin/ls -leO@ folder_with_a_icon_added_to_it/


total 504
-rw-r--r--@ 1 me  staff  - 0 Aug 14 15:58 Icon?
	com.apple.FinderInfo	32
	com.apple.ResourceFork	254839


Besides resource forks, it will also show permissions (man chmod), Access Control List (man chmod), and flags (see man chflags)


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Terminal ls command argument(s) to list file properties

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.