LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Size occupied by a dir (with sub-dirs) (https://www.linuxquestions.org/questions/linux-newbie-8/size-occupied-by-a-dir-with-sub-dirs-682788/)

chipotphe 11-12-2008 01:18 AM

Size occupied by a dir (with sub-dirs)
 
Hello,

I want to move a whole directory (incl its sub-dirs) to a new partition.
Before starting to do so I want to know what the size is this dir occupies on my actual partition. (to be sure that the new partition is great enough).

How can I know what the actual size is ?
My dir to move is /home/me/data/*

Thanks

syg00 11-12-2008 01:25 AM

Try "man du"

anonobomber 11-12-2008 02:31 AM

And if the man page confuses you then you can run 'du -sh'. Another one that is helpful is 'du --max-depth=1 .' which will tell you the size of the contents of each directory. To go one step further you can sort these by the size of the contents by running 'du --max-depth=1 . | sort -n' which makes finding which folder is using the most space easy.

chipotphe 11-15-2008 09:03 AM

Thanks to all.
I got the information I needed.

ps : doe someone know how I can get the information of the size used in sectors ? (ranish Partition manager works with sectors. It would be easy to have the size used by the dir in sectors)


All times are GMT -5. The time now is 01:41 AM.