Skip to content

Commit

Permalink
added distro specific aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
graysky2 committed Feb 16, 2013
1 parent f7b3b00 commit b1c2253
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
43 changes: 29 additions & 14 deletions shell/.aliases
Original file line number Original file line Diff line number Diff line change
@@ -1,18 +1,8 @@
# aliases # general aliases
alias v="vim" alias v="vim"
alias vd="vimdiff" alias vd="vimdiff"
alias xx="exit" alias xx="exit"
alias wget="wget -c" alias wget="wget -c"
alias aur="aurploader -r -l ~/.aurploader"
alias bb="sudo bleachbit --clean system.cache system.localizations system.trash && sudo cacheclean 2"
alias gitc="git commit -av ; git push -u origin master"
alias pacman="pacman-color"
alias pp="sudo pacman-color -Syu"
alias upp='reflector -c "United States" -a 1 -f 3 --sort rate --save /etc/pacman.d/mirrorlist && cat /etc/pacman.d/mirrorlist && sudo pacman-color -Syyu'
alias fpp="echo 'Server = http://mirror.us.leaseweb.net/archlinux/\$repo/os/\$arch' > /etc/pacman.d/mirrorlist && pp"
alias vup="vbox-headless-daemon start"
alias vdo="vbox-headless-daemon stop"

alias grep="grep --color=auto" alias grep="grep --color=auto"
alias zgrep="zgrep --color=auto" alias zgrep="zgrep --color=auto"
alias ma="cd /home/stuff/my_pkgbuild_files" alias ma="cd /home/stuff/my_pkgbuild_files"
Expand All @@ -21,16 +11,41 @@ alias ll="ls -lh"
alias la="ls -lha" alias la="ls -lha"
alias lt="ls -lhtr" alias lt="ls -lhtr"
alias lta="ls -lhatr" alias lta="ls -lhatr"

alias ..="cd .." alias ..="cd .."
alias ...="cd ../.." alias ...="cd ../.."
alias ....="cd ../../.." alias ....="cd ../../.."

alias hddtemp="sudo hddtemp" alias hddtemp="sudo hddtemp"
alias nets="sudo netstat -nlptu" alias nets="sudo netstat -nlptu"
alias nets2="sudo lsof -i" alias nets2="sudo lsof -i"
alias memrss='while read command percent rss; do if [[ "${command}" != "COMMAND" ]]; then rss="$(bc <<< "scale=2;${rss}/1024")"; fi; printf "%-26s%-8s%s\n" "${command}" "${percent}" "${rss}"; done < <(ps -A --sort -rss -o comm,pmem,rss | head -n 20)'
alias pg='echo "USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND" && ps aux | grep --color=auto' alias pg='echo "USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND" && ps aux | grep --color=auto'
alias dmesg="dmesg | sed '/UFW/d'" alias memrss='while read command percent rss; do if [[ "${command}" != "COMMAND" ]]; \
then rss="$(bc <<< "scale=2;${rss}/1024")"; fi; printf "%-26s%-8s%s\n" "${command}" "${percent}" "${rss}"; \
done < <(ps -A --sort -rss -o comm,pmem,rss | head -n 20)'

alias gitc="git commit -av ; git push -u origin master"
alias aur="aurploader -r -l ~/.aurploader"
alias bb="sudo bleachbit --clean system.cache system.localizations system.trash && sudo cacheclean 2"
alias pacman="pacman-color"
alias pp="sudo pacman-color -Syu"
alias upp='reflector -c "United States" -a 1 -f 3 --sort rate --save /etc/pacman.d/mirrorlist && cat /etc/pacman.d/mirrorlist && sudo pacman-color -Syyu'
alias fpp="echo 'Server = http://mirror.us.leaseweb.net/archlinux/\$repo/os/\$arch' > /etc/pacman.d/mirrorlist && pp"
alias vup="vbox-headless-daemon start"
alias vdo="vbox-headless-daemon stop"

# distro specific
if [[ -f /.fedora ]]; then
alias pp="sudo yum clean all && sudo yum upgrade && sudo yum clean all"
alias orphans="sudo package-cleanup --orphans"
fi

if [[ -f /.ubuntu ]]; then
alias pp="sudo aptitude update && sudo aptitude upgrade && sudo aptitude clean"
fi

if [[ -f /.debian ]]; then
alias pp="sudo aptitude update && sudo aptitude upgrade && sudo aptitude clean"
fi


# ssh shortcuts # ssh shortcuts
alias sa="$HOME/bin/s a" alias sa="$HOME/bin/s a"
Expand Down
8 changes: 0 additions & 8 deletions shell/.functions
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ fix() {
fi fi
} }


orphans() {
if [[ ! -n $(pacman -Qdt) ]]; then
echo "No orphans to remove."
else
sudo pacman -Rs $(pacman -Qdtq)
fi
}

r0() { find . -type f -size 0 -print0 | xargs -0 rm -f; } r0() { find . -type f -size 0 -print0 | xargs -0 rm -f; }


x() { x() {
Expand Down

0 comments on commit b1c2253

Please sign in to comment.