Unix Tools - Check Space Used + Find any files + Check Space Available
1.Check Space Using
$du -sh ${HOME} // check space used in Home
$du -sh ${HOME}/public_html // check space used in public_html
2.Finding file
$find ${HOME} -type f -size +1M -exec ls -ldh {} \ ;
$find ${HOME} -type f -size +10M -exec ls -ldh {} \ ; | less
$find ${HOME} -type f -size +10M -exec ls -ldh {} \ ; > thelistofbigfiles.txt
$find ${HOME} -name '*.bas' -print
$find ${HOME} -type f -exec grep -il frog {} \;
$find ${HOME} -type f -exec grep -il REM {} \;
.... +1M >> bigger than 1M
.... > thelisttofbigfiles.txt >> save the result in thelistofbigfile.txt
3.Check Space Available
$quota -v
Ex: in angsila.cs.buu.ac.th server::
53160083@angsila:~/a$ quota -v
quota: error while getting quota from banbung:/home/staff1 for 53160083 (id 53160083): Success
Disk quotas for user 53160083 (uid 53160083):
Filesystem blocks quota limit grace files quota limit grace
/dev/sda7 76 2000000 2100000
No comments:
Post a Comment