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:
which gives me an output like:
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:
which gives me (on top of the errors) an alphabetical order list of "ls", instead of what I would like which is more like a "-exec ls {}" in "find"...
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
For:
I get this:
.
./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
I get:
. Shouln't it be something like ./99584B685FF3
and for
.
./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 06:40 PM..
Reason: wrong info posted
OS : RHEL 6.6
I want to list the files/directories sorted (Ascending or Desceding) by their size.
As you can see in the below example, du command doesn't sort by size.
In Linux world, is there any other command or workaround using du command to list the files/directories sorted by their... (6 Replies)
I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms.
Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
Is there any command that can list out all the files size including directory in 1 command?
`ls` will only give 2048 for a directory, which i'm looking for the actual size. (5 Replies)
To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete some of the files inside the dir (0 Replies)
Hello,
I've done
ls -ls >fileout1
When I do the sort command for +4 it sorts it bu group. When I do +5 it sorts it by date. But it's skipping the file size column. Example:
rwxr-xr-x 1 Grueben sup 65 16 Sep 13:58 cdee
How can I sort it by file size? It doesn't... (2 Replies)
Hi,
We currently have an Oracle database running and it is creating lots of processes in the /proc directory that are 1000M in size. The size of the /proc directory is now reading 26T. How can this be if the root file system is only 13GB?
I have seen this before we an Oracle temp file... (6 Replies)
Hi ,
I have a list of files in the directory I want to sort based on the file name.
But in the middle of filename contains the number based on that I need to sort.Could you suggest me on the same?
Example filenames:
/user1$ls
RS.DEV.ISV.F1.RS.REFDATA.DATA... (1 Reply)
hi ,
iam trying to sort millions of records which is delimited and i cant able to
use sort command more than 60 million..if i try to do so i got an message stating that "File size limit exceeded",Is there any file size limit for using sort command..
How can i solve this problem.
thanks
... (7 Replies)