Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more  

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Linux Operating System > Linux Talk > Tips and Tricks
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 08-03-2005, 05:32 AM   #1 (permalink)
kayla
Member
 
Join Date: Jun 2005
Location: Tampa, Fla
Posts: 37
Default Find out the size of a directory

How do I list the size of all the contents of a directory? bytes,megs etc

thanks
kayla is offline   Reply With Quote
Sponsored Links
Old 08-03-2005, 06:19 AM   #2 (permalink)
taylor
Junior Member
 
Join Date: Aug 2005
Posts: 28
Default

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)

A tip when you are looking for man pages ..see 'man du'

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
taylor is offline   Reply With Quote
Old 10-05-2006, 07:41 AM   #3 (permalink)
pnelson
Junior Member
 
Join Date: Oct 2006
Posts: 17
Default Re: Find out the size of a directory

I think you mean "ls -hl", this prints a list of the files contained in the directory :-)
pnelson is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 06:28 AM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums