Skip to content

Instantly share code, notes, and snippets.

@xeoncross
Created July 11, 2011 17:06
Show Gist options
  • Save xeoncross/1076289 to your computer and use it in GitHub Desktop.
Save xeoncross/1076289 to your computer and use it in GitHub Desktop.
bashrc functions and aliases
# showa: to remind yourself of an alias (given some part of it)
showa () { /usr/bin/grep -i -a1 $@ ~/.aliases.bash | grep -v '^\s*$' ; }
# sourcea: to source this file (to make changes active after editing)
alias sourcea='source ~/.aliases.bash'
# Search current directory (and subdirectories) for files with "word"
function rg(){ grep -rl --exclude=\*/.svn/\* --exclude=\*/.git/\* --exclude=\*.swp $1 * }
# find_larger: find files larger than a certain size (in bytes)
find_larger() { find . -type f -size +${1}c ; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment