ls -lSr gives it to you in reverse sort, largest at the bottom for a
single dir. Helpful if needing to find the largest file
w/o paging the display. Likewise, ls -ltr is good for finding the most
recent file. Thanks to someone in the group who pointed these out to me.
Now part of my daily toolbox.
Ed
Robert Citek wrote:
On Jun 17, 2005, at 9:59 PM, Tom Chapin wrote:
On Jun 17, 2005, at 7:19 PM, Jerry wrote:
ls -l | grep ^- | sort -nr -k 5 | more
ls -lR | grep ^- | sort -nr -k 5 | more
The question is what does the hyphen mean in the | grep ^- | part?
Only show regular files, ignoring directories or other types of
files...
You can eliminate the sort command if you are using GNU ls with the -
S option:
ls -lS | grep ^-
ls -lRS | grep ^-
Regards,
- Robert
http://www.cwelug.org/downloads
Help others get OpenSource software. Distribute FLOSS
for Windows, Linux, *BSD, and MacOS X with BitTorrent
_______________________________________________
CWE-LUG mailing list
[email protected]
http://www.cwelug.org/
http://www.cwelug.org/archives/
http://www.cwelug.org/mailinglist/
--
Ed Howland
WDT Solutions, LLC.
[EMAIL PROTECTED]
(314) 962-0766
_______________________________________________
CWE-LUG mailing list
[email protected]
http://www.cwelug.org/
http://www.cwelug.org/archives/
http://www.cwelug.org/mailinglist/