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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a DIR/S for Linux?

Status
Not open for further replies.
Nov 28, 2004
329
US
In DOS or Windows, if you type in DIR/S, it will list the contents of the directory and all subdirectories and all subdirectories and so on. At the end, it gives you a total number of files and bytes used.

Is there an equivalent for this in Linux? I have used ls and dir in Linux, but have not found something like this. Basically, I would like to know much drive space a directory and its contents are taking up.

Thank you.
 
Also, find xdiskusage on sourceforge. Cool tool for graphically viewing the output of du.
Ericbrunson pointed this out to me. as he says it's cool.
 
Disk space stats are accessed by the du and df commands.
ls -lh shows long versions of files using human readable sizes (with units). The switch a says all (including dot files) so you could do:
ls -alh | less

or df -h
or du -h

[plug=shameless]
[/plug]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top