checking disk space using df and du
August 31st, 2006 mysurface Posted in Common, df, du | Hits: 9951 |
The common way to check for all partition disk space, how much is still remain, you can simple use
df -h
Usually I will put -h to make it size human readable.
Another good tools to check the disk space for directories, we use du. You may realized that when you type ls -l, the size of every directories have the same size 4096, it is because directories is actually a file. But for us, we want to know how large the load it store instead the directory file itself.
To show all directories size including sub directories, type
du -h
To calculate the current directory size you are in (-s stand for summary)
du -sh
To show all the 1 level sub directories size (which you are not interested at sub sub directories.)
du -sh *
To show the size of specific directory
du -sh /home
To show the size of all sub directories of a specific directory
du -sh /home/*
Live Chat!









April 4th, 2007 at 11:15 pm
[...] The first thing I do is to check the hardisk with df, or fdisk [...]
April 12th, 2007 at 2:07 am
[...] But, there are no ways for you to scan remote side by specified any options through command line. If you need to analyze your disk usage with only a light command, you can try du and df. [...]
July 9th, 2008 at 5:13 am
Cod no pain percocet pill prescription….
Cod no pain percocet pill prescription….