Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

command to check the free disk space

df

# To show values in human-readable format
df -h

# --total to output the total free space
df -h --total
Comment

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
Comment

PREVIOUS NEXT
Code Example
Shell :: git display unrelated histories 
Shell :: openssl p12 to pem 
Shell :: ec2 download file 
Shell :: docker run in the background 
Shell :: install yt-dlp windows 
Shell :: laravel download 
Shell :: ubuntu arial font 
Shell :: install vscode linux 
Shell :: kubectl cleanup pods 
Shell :: sudo apt install ubuntu-desktop ? 
Shell :: powershell add to env path 
Shell :: restart ubuntu 18.04 server 
Shell :: search code git 
Shell :: get vscode extensions with powershell script 
Shell :: linux remove all from current directory 
Shell :: git checkout tag 
Shell :: git force sync with remote 
Shell :: list file in tar archive 
Shell :: how to mount a hard drive in ubuntu 
Shell :: git code push 
Shell :: windows vpn service 
Shell :: uninstall node using n 
Shell :: how to create a new file in kali linux 
Shell :: git remove file from gitignore 
Shell :: gif to webm ffmpeg 
Shell :: install opencv raspberry pi 
Shell :: compress folder ubuntu 
Shell :: makefile ifeq or 
Shell :: new commit 
Shell :: iptable port forward 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =