I love Linux.

It's like a wish fulfilment genie.

I like sorting directories either by size...

ls --sort=size -lr

or last modified time....

ls -lrt

Then I came across a whole directory of documents, and most of which are
years and years old...

So I wanted to list the whole lot by time.

Just like
    du -a | sort -n
except that lists all files and sorts by size.

I wish I had something like "du" except it reported time instead of size....


Hmmm...

du --help
.
.
.
      --time            show time of the last modification of any file in
the
                          directory, or any of its subdirectories
      --time=WORD       show time as WORD instead of modification time:
                          atime, access, use, ctime or status
      --time-style=STYLE  show times using style STYLE:
                          full-iso, long-iso, iso, +FORMAT
                          FORMAT is interpreted like 'date'

Wow! it does that these days!

du --time-style=long-iso  --time -a | sort -k 2 -k 3

Done!

I love linux.

-- 
John Carter
Phone : (64)(3) 358 6639
Tait Electronics
PO Box 1645 Christchurch
New Zealand

-- 

------------------------------
This email, including any attachments, is only for the intended recipient. 
It is subject to copyright, is confidential and may be the subject of legal 
or other privilege, none of which is waived or lost by reason of this 
transmission.
If you are not an intended recipient, you may not use, disseminate, 
distribute or reproduce such email, any attachments, or any part thereof. 
If you have received a message in error, please notify the sender 
immediately and erase all copies of the message and any attachments.
Unfortunately, we cannot warrant that the email has not been altered or 
corrupted during transmission nor can we guarantee that any email or any 
attachments are free from computer viruses or other conditions which may 
damage or interfere with recipient data, hardware or software. The 
recipient relies upon its own procedures and assumes all risk of use and of 
opening any attachments.
------------------------------
_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users

Reply via email to