Solved

du for / and mt pts

Posted on 2007-03-22
4
404 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
  • 2
4 Comments
 
LVL 14

Assisted Solution

by:sjm_ee
sjm_ee earned 200 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
thx much
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now