Advertisement
cirrus

Alias 'es

Sep 28th, 2012
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.65 KB | None | 0 0
  1. ~/.bashrc
  2.  
  3. # modified commands
  4. alias diff='colordiff' # requires colordiff package
  5. alias grep='grep --color=auto'
  6. alias more='less'
  7. alias df='df -h'
  8. alias du='du -c -h'
  9. alias mkdir='mkdir -p -v'
  10. alias nano='nano -w'
  11. alias ping='ping -c 5'
  12. alias ..='cd ..'
  13.  
  14. # new commands
  15. alias da='date "+%A, %B %d, %Y [%T]"'
  16. alias du1='du --max-depth=1'
  17. alias hist='history | grep $1' # requires an argument
  18. alias openports='netstat --all --numeric --programs --inet --inet6'
  19. alias pg='ps -Af | grep $1' # requires an argument (note: /usr/bin/pg is installed by the util-linux package; maybe a different alias name should be used)
  20.  
  21. # privileged access
  22. if [ $UID -ne 0 ]; then
  23. alias sudo='sudo '
  24. alias scat='sudo cat'
  25. alias svim='sudo vim'
  26. alias root='sudo su'
  27. alias reboot='sudo reboot'
  28. alias halt='sudo halt'
  29. alias update='sudo pacman -Su'
  30. alias netcfg='sudo netcfg2'
  31. fi
  32.  
  33. # ls
  34. alias ls='ls -hF --color=auto'
  35. alias lr='ls -R' # recursive ls
  36. alias ll='ls -l'
  37. alias la='ll -A'
  38. alias lx='ll -BX' # sort by extension
  39. alias lz='ll -rS' # sort by size
  40. alias lt='ll -rt' # sort by date
  41. alias lm='la | more'
  42.  
  43. # safety features
  44. alias cp='cp -i'
  45. alias mv='mv -i'
  46. alias rm='rm -I' # 'rm -i' prompts for every file
  47. alias ln='ln -i'
  48. alias chown='chown --preserve-root'
  49. alias chmod='chmod --preserve-root'
  50. alias chgrp='chgrp --preserve-root'
  51.  
  52. # pacman aliases (if applicable, replace 'pacman' with your favorite AUR helper)
  53. alias pac="pacman -S" # default action - install one or more packages
  54. alias pacu="pacman -Syu" # '[u]pdate' - upgrade all packages to their newest version
  55. alias pacs="pacman -Ss" # '[s]earch' - search for a package using one or more keywords
  56. alias paci="pacman -Si" # '[i]nfo' - show information about a package
  57. alias pacr="pacman -R" # '[r]emove' - uninstall one or more packages
  58. alias pacl="pacman -Sl" # '[l]ist' - list all packages of a repository
  59. alias pacll="pacman -Qqm" # '[l]ist [l]ocal' - list all packages which were locally installed (e.g. AUR packages)
  60. alias paclo="pacman -Qdt" # '[l]ist [o]rphans' - list all packages which are orphaned
  61. alias paco="pacman -Qo" # '[o]wner' - determine which package owns a given file
  62. alias pacf="pacman -Ql" # '[f]iles' - list all files installed by a given package
  63. alias pacc="pacman -Sc" # '[c]lean cache' - delete all not currently installed package files
  64. alias pacm="makepkg -fci" # '[m]ake' - make package from PKGBUILD file in current directory
  65.  
  66. #alias1
  67. # alias
  68. alias pacsyy="sudo pacman -Syy" #update mirrors
  69. alias pacsu="sudo pacman -Su" #upgrade all packages
  70. alias pacinfo="sudo pacman -Si" #show information about a package
  71. alias pacsyu="pacman -Syu" #upgrade all packages to latest version
  72. alias pacinst="sudo pacman -S" #install package/s
  73. alias paclist="sudo pacman -Ql" #list all files installed by package
  74. alias paclistll="pacman -Qqm" #list all packages locally installed
  75. alias pacr="sudo pacman -R" #uninstall one or more package/s
  76. alias pacrns="sudo pacman -Rns" #uninstall package and deps
  77. alias pacorph="sudo pacman -Qdt" #list all packages which are orphaned
  78. alias pacown="pacman -Qo" #determine which package owns a given file
  79. alias pacsearch="sudo pacman -Ss" #search for a package (not AUR)
  80. alias pacachec="pacman -Sc" #delete all package files from cache
  81. alias ysearch="sudo yaourt -Ss" #search for a package AUR
  82. alias yinstall="sudo yaourt -S" #yaourt install package
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement