Solved

du for / and mt pts

Posted on 2007-03-22
4
425 Views
Last Modified: 2013-11-17
I need to find out the size of each file under root (/) and its sub dir  as well as any other mt pts

I have tried like these:

du -m / |sort +0rn
du -m . |sort +0rn

but, they don't give me what I need.

thx

0
Comment
Question by:ethanjohnsons
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 14

Assisted Solution

by:sjm_ee
sjm_ee earned 200 total points
ID: 18773471
The size of each file in *whole* directory tree? Well, "find / -ls" will need some parsing but it is all there. Better is to install the "gnu" find, and then use "find / -printf ...".
0
 

Author Comment

by:ethanjohnsons
ID: 18773715
this ( find / -ls |sort +4nr |more ) would be what I need as long as I can exclude certain dirs i.e. /proc.

find: 0652-023 Cannot open file /proc/491944.
sort: 0653-657 A write error occurred while sorting.

thx

0
 
LVL 4

Accepted Solution

by:
JulieBouillon earned 300 total points
ID: 18866524
If you just want to get rid of the error messages, then you can use:
find / -ls 2>/dev/null | sort +4nr | more
0
 

Author Comment

by:ethanjohnsons
ID: 19032140
thx much
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question