Skip to content

Instantly share code, notes, and snippets.

@akhildave
Last active February 8, 2023 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akhildave/a89f72527196fe9f56137f6592b860e5 to your computer and use it in GitHub Desktop.
Save akhildave/a89f72527196fe9f56137f6592b860e5 to your computer and use it in GitHub Desktop.
Find files more than 200MB
-----
sudo find / -type f -size +200M -exec ls -lh {} \;
----
truncate file using below command
--
truncate -s0 /var/www/FreshSchoolsApi/releases/20160824093323/log/production.log
--
Free RAM:
--
free -m
--
Free disk
-----
df -h
df -i -> list inodes also
-----
list size of all files in directory
-----------------------------------
du -a -h --max-depth=1 | sort -hr
-----------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment