Skip to content

Instantly share code, notes, and snippets.

@kolunar
Created April 24, 2017 22:54
Show Gist options
  • Save kolunar/3141b569938c20c3501565396fb6d8a2 to your computer and use it in GitHub Desktop.
Save kolunar/3141b569938c20c3501565396fb6d8a2 to your computer and use it in GitHub Desktop.
SSH search keywords, files & folders basic commands
grep -r -H "search string" *
ref: https://www.siteground.com/tutorials/ssh/ssh_searching.htm
find /path/to/fies -type f -name "*.js" -exec grep -il 'string' {}\; > output.txt
count number of files within a dir recursively or specifically:
==============================================================
$ find /var/www/html/cache/ -type f -print | wc -l
$ ls | wc -l
ref: https://www.exchangecore.com/blog/count-number-files-directory/
common SSH commands
===================
https://mediatemple.net/community/products/dv/204643550/common-ssh-commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment