Part 2 in the Basic Linux commands; How to view storage space details and information such as free space on Linux, Part 1 was Navigation, folders and files.
Primarily this is done using the Disk file system command df
To view the system disk information in a human readable format (KB, MB, GB and TB) use
df -h
To view as MB use
df -m
View file system types
df -T
Disk usage (du) can be used for directory sizes
View the current directory size in a readable format summary
du -sh
Or you can specify directory
du -sh directory/foldername
To include 1 level of sub directories in size most to least:
du -h --max-depth=1 | sort -hr
You can change the 1 to 2 or 3 to dive deeper into sub directories.
A drained and empty Kennington reservoir images from a drone in early July 2024. The…
Merrimu Reservoir from drone. Click images to view larger.
Using FTP and PHP to get an array of file details such as size and…
Creating and using Laravel form requests to create cleaner code, separation and reusability for your…
Improving the default Laravel login and register views in such a simple manner but making…
Laravel validation for checking if a field value exists in the database. The validation rule…