-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
74 lines (57 loc) · 1.81 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
alias c='clear'
## Colorize the ls output ##
alias ls='ls --color=auto'
## Use a long listing format ##
alias ll='ls -la'
## get rid of command not found ##
alias cd..='cd ..'
## a quick way to get out of current directory ##
alias ..='cd ..'
alias ...='cd ../../../'
alias ....='cd ../../../../'
alias .....='cd ../../../../'
alias .4='cd ../../../../'
alias .5='cd ../../../../..'
## Colorize the grep command output for ease of use (good for log files)##
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
## Make mount command output pretty and human readable format ##
alias mount='mount |column -t'
## Command short cuts to save time ##
alias h='history | nl'
alias j='jobs -l'
## New useful commands ##
alias path='echo -e ${PATH//:/\\n}'
alias now='date +"%T"'
alias nowtime=now
alias nowdate='date +"%d-%m-%Y"'
# do not delete / or prompt if deleting more than 3 files at a time #
alias rm='rm -I --preserve-root'
# confirmation #
alias mv='mv -i'
alias cp='cp -i'
alias ln='ln -i'
# Parenting changing perms on / #
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'
# distro specific - Debian / Ubuntu and friends #
# install with apt
alias apt="sudo apt"
alias apt-get="sudo apt"
alias updatey="sudo apt --yes"
## Preserves the user environment when running commands with elevated privileges, ensuring consistency. ##
alias sudo="sudo -E"
# update on one command
alias update='sudo apt update && sudo apt upgrade && sudo apt autoremove'
# reboot / halt / poweroff
alias reboot='sudo /sbin/reboot'
alias poweroff='sudo /sbin/poweroff'
alias halt='sudo /sbin/halt'
alias shutdown='sudo /sbin/shutdown'
## Resume wget by default ##
alias wget='wget -c'
## Quality of life improvements ##
alias df='df -H'
alias du='du -ch'