1

I have a Apple server, and when I use ls -alFt

output shows:

"drwxrwxrwx   267 admin  www        9078 Mar 31  2010 3/"

and

"drwxrwxrwx   483 admin  www       16422 Jul  9 09:58 26/"

what is the real time?

I'm looking for older folders to move it, but I don't understand the output format.

2 Answers2

3

ls only shows the creation time if the file was recently made (6 months, according to man ls), otherwise it shows the year. If you want to see full information on a file or directory use stat. It's manpage has examples on how to combine stat with sort to order things around by modification time.

What you probably want, though, is find . -mtime +365d with a suitable age in there in place of 365 days.

DerfK
  • 19,493
  • 2
  • 38
  • 54
0

cmiiw

 -t      Sort by time modified (most recently modified first) before sorting the operands by lexicographical order.

"drwxrwxrwx 267 admin www 9078 Mar 31 2010 3/" <== older

"drwxrwxrwx 483 admin www 16422 Jul 9 09:58 26/" <== newer

if you using ls -alFt, so the first line is the newest

chocripple
  • 2,109
  • 14
  • 9