![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to list a file size, but not its name? | ordano | UNIX for Dummies Questions & Answers | 2 | 02-12-2009 02:00 AM |
| command to list file size | rgordon | HP-UX | 3 | 12-05-2007 05:43 AM |
| List File size | komputersman | UNIX for Dummies Questions & Answers | 10 | 06-13-2007 04:39 PM |
| File size limitation of unix sort command. | cskumar | Shell Programming and Scripting | 7 | 10-07-2005 10:37 AM |
| list file's by size order in sepecfied directory and sub directories | ferretman | UNIX for Dummies Questions & Answers | 2 | 01-03-2002 07:55 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Sort by size, then list file in each directory
Hi,
I have directories with name like: aaa bbb ccc ... I would like to to see which directories are the largest and then list the files within each. I have success using: Code:
du -ks * | sort -rin | head -n 20 120 bbb 27 ccc 3 aaa ... I would like to be able to do a simple "ls" so I have a clearer view of what's in each of the big directory. Without knowing anything about xargs, I am trying: Code:
du -ks * | sort -rin | head -n 20 | xargs ls ls: 3: No such file or directory ls: 120: No such file or directory ls: 27: No such file or directory aaa: will_cover_page.gif bbb: will_dependents_page_2.gif will_dependents_page_4.gif will_dependents_page_3.gif ccc: will_dependents_page_1.gif will_signatures.gif Is there a more efficient way of doing this? Thanks in advance... |
|
||||
|
For:
Code:
find . -type d -size +2 . ./99584B685FF3/bbb.app ./D3B9BA1F472/www.app ./830F3FF6E3F9/Documents ./A754A83053D/www.app ... For some reason, it finds stuff one directory lower... "99584B685FF3" is the directory I am aiming for, so I tried Code:
find . -type d -size +2 -maxdepth 1 . Shouln't it be something like ./99584B685FF3 ![]() and for Code:
find . -type d -size +2 -maxdepth 2 ./99584B685FF3/bbb.app ./D3B9BA1F472/www.app ./830F3FF6E3F9/Documents ./A754A83053D/www.app ... What could be the reason. I initially thought directories were just "special files" in UNIX and do not have a size. But the "Documents" shown is really a directory. Thanks for suggesting but still no go. Furthermore, I am losing all the size sorting - largest directory first Last edited by ChatPerdu; 07-01-2009 at 05:40 PM.. Reason: wrong info posted |
| Sponsored Links | ||
|
|