-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
90 lines (61 loc) · 1.77 KB
/
.bash_aliases
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#command to show aliases
alias ali='alias | less'
#package aliases
alias apt-atrm='sudo apt-get autoremove'
alias apt-ls='apt --installed list'
alias apt-upgd='sudo apt-get update && sudo apt-get dist-upgrade -u -V -y'
alias dpkg-shpkg='dpkg --get-selections | grep -v deinstall'
#change directory aliases
alias cd-='cd -'
alias cd..='cd ..'
alias cdm='cd ~/myfiles'
alias cdd='cd ~/Desktop'
alias cdl='cd ~/Downloads'
#alias to check ram
alias chkram='free -m -h G'
#git aliases
alias git-cl='git config --list'
#gpg aliases
alias gpls='gpg --list-keys'
alias gplss='gpg --list-secret-keys'
#list only hidden files
alias lsd='ls -la | grep ".*\s[.].*" | less'
#list only directories
alias lsdir='ls -d */'
#show only regular files
alias lsf='ls -p | grep -v /'
#list users
alias lsusr='cut -d: -f1 /etc/passwd | less'
#alias to source files
alias salias='source ~/.bash_aliases'
#alias to edit files
alias valias='vim ~/.bash_aliases'
alias vscreen='vim ~/.screenrc'
alias vvim='vim ~/.vimrc'
alias vxmod='vim ~/.Xmodmap'
#xmodmaps
alias xdef='xmodmap -pke >~/.Xmodmap'
alias xsrc='xmodmap ~/.Xmodmap'
############################################################################################
############################################################################################
############################################################################################
#install package
install_pack(){
sudo apt-get install $1
}
alias apt-in=install_pack
#removes the binary and files associated with the package
remove_pack(){
sudo apt-get purge --auto-remove $1
}
alias apt-rmv=remove_pack
#show package info
show_pack(){
sudo apt-cache show $1
}
alias apt-shw=show_pack
#test
clean_find(){
find $1 -name $2 2> /dev/null
}
alias cfind=clean_find