visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Operating Systems :: Unix :: get files' disk space data on FreeBSD or regular Unix filesystem


By: VGR France  Date: 06/10/2004 09:02:12  English  Points: 300 Status: Answered
Quality : Excellent
WHO can give the most-Unix-compatible (cross platform) command to get the different sizes (disk space of contained subdirectories and "regular" files - excluding following symlinks - ) of directories on a filesystem ?

Like a XDIR /S/R/D on DR-DOS ;-)

Alternatively, points will go to the best answer for FreeBSD or linux

Thanks, I ran out of ideas.
By: SeCuRi[T] Date: 07/10/2004 04:33:31 English  Type : Comment
du -ah

a is to list the files of the subdirs and h is to make it more readable ;)
By: VGR Date: 08/10/2004 21:18:16 English  Type : Comment
Nice, but I want an agregate (sum) of the sizes of files in each level of subdirectories, not the size of each file on the filesystem ;-)
By: spoonman Date: 24/04/2006 00:30:52 English  Type : Answer
If you want to see totals by directory try this:

du -Shc

This will give you a size per subdirectory.

The 'S' is for subdiretories 'h' for human readable sizes and the 'c' gives you a total of all at the end.

if you add an 'a' to the arguement list, you will also get a report for each file.

du -Shca
By: VGR Date: 24/04/2006 13:35:07 English  Type : Comment
at last ;-)

many thanks

Do register to be able to answer

EContact
browser fav
page generated in 352.529050 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page