Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list directory size of recursive contents

Status
Not open for further replies.

bobbybobbertson

Programmer
Nov 9, 2001
119
US
How do I list the size of all the contents of a directory?
 
Hi,

If you mean totals :

du -sh /home/joe (grand total only)

du -h /home/joe (for each subdirectory)

du -sSh /home/joe (don't count all subdirectories)

etc.

see 'man du'

Regards




 
thanks ifincham,
i looked everywhere yesterday. i did do a 'man ls'. but what i was looking for does not seem possible with that. the 'du' command is what i was looking for.

my problem in finding the command was that searches for things like 'directory size list linux' gives the directories of listings of people on mailing lists when put into search engines.

thanks again
 
Hi,

A tip when you are looking for man pages ..

Use the -k flag to list all manpages that use a given keyword. For example :

man -k samba

returns a list like this ....

lmhosts (5) - The Samba NetBIOS hosts file
make_smbcodepage (1) - construct a codepage file for Samba
SAMBA [samba] (7) - A Windows SMB/CIFS fileserver for UNIX
smb.conf [smb] (5) - The configuration file for the Samba suite
smbpasswd (5) - The Samba encrypted password file
smbstatus (1) - report on current Samba connections
swat (8) - Samba Web Administration Tool
Samba [samba] (7) - A Windows SMB/CIFS fileserver for UNIX
lmhosts (5) - The Samba NetBIOS hosts file
make_smbcodepage (1) - Construct a codepage file for Samba
smb.conf [smb] (5) - The configuration file for the Samba suite
smbpasswd (5) - The Samba encrypted password file
smbstatus (1) - report on current Samba connections
swat (8) - Samba Web Administration Tool

You can then do 'man swat' etc. Or explicitly using the section number 'man 7 samba' .

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top