Answers for "command to check the amount of disk space used"

0

command to check the amount of disk space used

du

# To specify a folder
du <folder>

# -h to print the sizes in human-readable format 
# -c to specify the grand total size

# for Example, displays the grand total in human readable format
du -hc 

# We can sort the output according to size
du -h | sort -h

# to check for the larger files
du -h | sort -h | tail
OR
du -h | sort -hr | head
Posted by: Guest on April-14-2022

Code answers related to "command to check the amount of disk space used"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language