Skip to content

Instantly share code, notes, and snippets.

@andreav
Last active December 18, 2015 13:25
Show Gist options
  • Save andreav/3870866 to your computer and use it in GitHub Desktop.
Save andreav/3870866 to your computer and use it in GitHub Desktop.
My .aliases
alias ls='ls --color=tty'
alias ll='ls -lah'
alias lll='ls -lahtr'
alias ff='find $( pwd ) -follow -name '
alias fic='find $( pwd ) -follow -name "*.c" -o -name "*.cc" -o -name "*.cpp" | xargs grep --color -e '
alias fih='find $( pwd ) -follow -name "*.h" | xargs grep --color -e '
alias fis='find $( pwd ) -follow -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.h" | xargs grep --color -e '
alias fif='find $( pwd ) -follow -type f -not -name "*~" -not -name "*swp" | xargs grep --color -e '
alias fip='find $( pwd ) -follow -name "*.py" | xargs grep --color -e '
alias qff='find $( pwd ) -follow 2>/dev/null -name '
alias qfic='find $( pwd ) -follow -name "*.c" -o -name "*.cc" -o -name "*.cpp" 2>/dev/null | xargs grep --color -e '
alias qfih='find $( pwd ) -follow -name "*.h" 2>/dev/null | xargs grep --color -e '
alias qfis='find $( pwd ) -follow -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.h" 2>/dev/null | xargs grep --color -e '
alias qfif='find $( pwd ) -follow -type f 2>/dev/null| xargs grep --color -e '
alias qfip='find $( pwd ) -follow -name "*.py" 2>/dev/null | xargs grep --color -e '
alias pf='ps -A -o user,pid,s,pcpu,pmem,tty,stime,args'
alias pa='ps -a -o user,pid,s,pcpu,pmem,tty,stime,fname'
#Remove all pyc files
alias rmpyc="find . -name '*.pyc' -exec rm {} \;"
alias greppy='find . -name "*.py" | grep xargs'
#find $dirname -type f -exec grep -i ${for_redmine} --color "${what}" {} \; -print
#
# docker
#
alias dpsa='docker ps -a'
alias dpsl='docker ps -l'
alias dattach='docker attach'
alias dstart='docker start'
alias dstop='docker stop'
alias dremove='docker rm'
alias dremovelast='docker stop $(dpsl -q); docker rm $( dpsl -q)'
alias dremoveall='docker stop $(dpsa -q); docker rm $( dpsa -q)'
function dexecbash() { docker exec -it $1 bash; }
#
# docker-compose
#
alias dcpsl='docker-compose ps'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment