Skip to content

Instantly share code, notes, and snippets.

@grambas
Last active January 21, 2019 19:12
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 grambas/603dab79949d74e5e41f3e1329f1d295 to your computer and use it in GitHub Desktop.
Save grambas/603dab79949d74e5e41f3e1329f1d295 to your computer and use it in GitHub Desktop.
[Terminal]
Check what process is using a port
netstat -tulpn | grep 80
Search in 'path' for 'pattern' in files
grep -rnw 'path' -e 'pattern'
Search in 'to/path' for file 'pattern'
find /to/path -xdev -name pattern
unarchive tar.gz
tar xf /path/archive.tar.gz -C /to/path
Show last modificated files from current paths recursivly

Usage: set +x perm, move to bin and just call script. Example: last_mod.sh

find $1 -type f -print0 | xargs -0 stat --format '%Y :%y %n' | sort -nr | cut -d: -f2- | head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment