Linux disk space commands¶
Get the used and available disk space for different devices¶
As plain number:
df
In human readable format:
df -h
List all directories in the current file ordered by size¶
As plain number:
ls -A | xargs -I {} du -s {} | sort -rn
Human readable:
ls -A | xargs -I {} du -sh {} | sort -rh
This command is available under the shortcut ls-sif the pc is configured like described in debian-i3-pc-setup
See also:
How to sort by size
How to include hidden and special files and directories
Find duplicate files¶
Install fdupes
apt install fdupes
Search file duplicates in chosen directory
fdupes -r /my/chosen/directory