osx – list files by date added

osx terminal commands to list files in order added. Similar to finder sort option

$ mdls -name kMDItemFSName -name kMDItemDateAdded -raw * | xargs -0 -I {} echo {} | sed 'N;s/\n/ /' | sort

Reference

http://apple.stackexchange.com/questions/86307/can-i-list-files-ordered-by-date-added-to-a-folder-from-a-command-line-tool-like

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s