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

List of Sub Directories under directories 1

Status
Not open for further replies.

venkatpavan

Programmer
Feb 18, 2006
42
SG
Hi,

Could you please give me commands that lists all directories and sub directories in it and size of those.

Eg:
I have directory XXXX and YYYY,In XXXX i have sub directories AA and BB,In YYYY i have DD and FF.DO we have any command that lists all these directories and sub directories in that order.

XXXX
AA
BB
YYYY
DD
FF

Thanks.....
 
Try something along the lines of
Code:
find . -type d -exec du -sk {} \;
man find and du for more details. I can't guarantee the order though.

Ceci n'est pas une signature
Columb Healy
 
I know that this is a little off topic - but I created an alias [red]dusk[/red] that is really helpful.
Code:
alias -x dusk='du -sk | sort -n'
I use it all the time to see the biggest space wasters in terms of files and/or directories. But it is only for the current directory - sorry.

Einstein47
“Evil abounds when good men do nothing.“ - Nelson R.
[[]Starbase47.com]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top