How to know the free disk space (du df) (bash)

To know the free space in a partition type in a terminal:

du / -ch

The slash indicates the highest point in the path

the option -c shows the total amount of free space

the option -h formats the result in human readable text such as Kb, Mb, Gb

If you want to see the details one page at a time use the following command:

du / -ch | less

It is also useful the following command:

du / -ch --max-depth=1

If you want to see only the files that use Mb of disk space use the following command:

du / -ch | grep M | less

Another useful command is as follow:

df -h

You can also use the find command:

find / -size +10M

which finds files or directories which occupy more than 10 Mb of disk space

If you want to know how much disk space occupies one single file use this command:

du -h