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 :: create a new file in bash script 
Shell :: flask make how public 
Shell :: create samba user ubuntu 
Shell :: exit pipenv shell 
Shell :: npm install different version 
Shell :: authentication failed github 
Shell :: le wagon setup 
Shell :: mac make bootable usb 
Shell :: kuberetes config 
Shell :: bash delete a command line 
Shell :: powershell and command 
Shell :: git hub nvm 
Shell :: apache airflow docker 
Shell :: diff between two files 
Shell :: install gitlab runner 
Shell :: poetry create requirements.txt python 
Shell :: bash split pipe output by delimiter 
Shell :: shell get all lines that are in one file and not another 
Shell :: install Promtail Agent 
Shell :: npm -g mac privileges 
Shell :: powershell download file from api url 
Shell :: git reset deinit and update submodule and re clone all submodules 
Shell :: Add branch to git prompt ubuntu wsl 
Shell :: delete all view options mac os 
Shell :: Set email address for LFD alerts 
Shell :: store all terminal output in a file 
Shell :: sudo kill code for shutting down 48 
Shell :: no matches found: *.dmg 
Shell :: typo3 clearc chace over commandline 
Shell :: convert shell script to yaml 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =