-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bash.alias
63 lines (58 loc) · 2.6 KB
/
.bash.alias
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# modified commands
alias diff='colordiff' # requires colordiff package
alias grep='grep --color=auto'
alias more='less'
alias df='df -h'
alias du='du -c -h'
alias mkdir='mkdir -p -v'
alias nano='nano -w'
alias ping='ping -c 5'
alias ..='cd ..'
# new commands
alias da='date "+%A, %B %d, %Y [%T]"'
alias du1='du --max-depth=1'
alias hist='history | grep $1' # requires an argument
alias openports='netstat --all --numeric --programs --inet --inet6'
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)
# privileged access
if [ $UID -ne 0 ]; then
alias sudo='sudo '
alias scat='sudo cat'
alias svim='sudo vim'
alias root='sudo su'
alias reboot='sudo reboot'
alias halt='sudo halt'
alias update='sudo pacman -Su'
alias netcfg='sudo netcfg2'
fi
# ls
alias l='ls -la'
alias ls='ls -hF --color=auto'
alias lr='ls -R' # recursive ls
alias ll='ls -l'
alias la='ll -A'
alias lx='ll -BX' # sort by extension
alias lz='ll -rS' # sort by size
alias lt='ll -rt' # sort by date
alias lm='la | more'
# safety features
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -I' # 'rm -i' prompts for every file
alias ln='ln -i'
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'
# pacman aliases (if applicable, replace 'pacman' with 'yaourt'/'pacaur'/whatever)
alias pac="pacman -S" # default action - install one or more packages
alias pacu="pacman -Syu" # '[u]pdate' - upgrade all packages to their newest version
alias pacs="pacman -Ss" # '[s]earch' - search for a package using one or more keywords
alias paci="pacman -Si" # '[i]nfo' - show information about a package
alias pacr="pacman -R" # '[r]emove' - uninstall one or more packages
alias pacl="pacman -Sl" # '[l]ist' - list all packages of a repository
alias pacll="pacman -Qqm" # '[l]ist [l]ocal' - list all packages which were locally installed (e.g. AUR packages)
alias paclo="pacman -Qdt" # '[l]ist [o]rphans' - list all packages which are orphaned
alias paco="pacman -Qo" # '[o]wner' - determine which package owns a given file
alias pacf="pacman -Ql" # '[f]iles' - list all files installed by a given package
alias pacc="pacman -Sc" # '[c]lean cache' - delete all not currently installed package files
alias pacm="makepkg -fci" # '[m]ake' - make package from PKGBUILD file in current directory