Skip to content

Instantly share code, notes, and snippets.

@migaes
Last active April 9, 2017 18:11
Show Gist options
  • Save migaes/b7dea2ebbafbefc3ee9a987d628c406d to your computer and use it in GitHub Desktop.
Save migaes/b7dea2ebbafbefc3ee9a987d628c406d to your computer and use it in GitHub Desktop.
My day-to-day commands
### Add tag on the current state of the branch you are
$ git tag release01
$ git push origin --tags
---------------------------------------------
### Remove a tag
$ git tag -d release01
$ git push origin :refs/tags/release01
---------------------------------------------
### Search for a string on multiple files
$ find . -name *.conf -exec grep -n serverName {} \; -print
---------------------------------------------
### Check all redirections before access a url
$ curl -I -L awsperkbox.huddlebuy.co.uk
---------------------------------------------
### Find the largest 10 files
$ find / -type f -print0 | xargs -0 du | sort -n | tail -10 | cut -f2 | xargs -I{} du -sh {}
---------------------------------------------
### Kill proccesses by regex
$ kill $(ps aux | grep 'loquesea' | awk '{print $2}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment