?
Solved

du for / and mt pts

Posted on 2007-03-22
4
Medium Priority
?
431 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 800 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 1200 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 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