Ralf Beckesch 1 هفته پیش
والد
کامیت
b839e0ab05
1فایلهای تغییر یافته به همراه107 افزوده شده و 0 حذف شده
  1. 107 0
      empty_bash_aliases

+ 107 - 0
empty_bash_aliases

@@ -0,0 +1,107 @@
+# Add your generic aliases here
+#   (may be they are overwritten by later loaded scripts...)
+
+alias ls='ls --color=auto'
+alias grep='grep --color=auto'
+
+# some more ls aliases
+#alias ll='ls -l'
+#alias la='ls -A'
+#alias l='ls -CF'
+
+## if user is not root, pass all commands via sudo #
+if [ $UID -ne 0 ]; then
+	alias reboot='sudo reboot'
+	alias update='sudo apt-get upgrade'
+	alias apt-get="sudo apt-get"
+	alias updatey="sudo apt-get --yes"
+	# update on one command
+	alias update='sudo apt-get update && sudo apt-get upgrade'
+fi
+
+## cd specific
+## 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'
+
+## Create parent directories on demand
+#alias mkdir='mkdir -pv'
+
+## Make mount command output pretty and human readable format
+# alias mount='mount |column -t'
+
+
+## Command short cuts to save time
+#alias h='history'
+#alias j='jobs -l'
+
+## Create a new set of commands
+#alias path='echo -e ${PATH//:/\\n}'
+alias now='date +"%T"'
+alias nowtime=now
+alias nowdate='date +"%d-%m-%Y"'
+
+## Set vim as default
+#alias vi=vim
+#alias svi='sudo vi'
+#alias vis='vim "+set si"'
+#alias edit='vim'
+
+## Control output of networking tool called ping
+## 	Stop after sending count ECHO_REQUEST packets #
+#alias ping='ping -c 5'
+## 	Do not wait interval 1 second, go fast #
+#alias fastping='ping -c 100 -s.2'
+
+## Show open ports
+##	Use netstat command to quickly list all TCP/UDP port on the server:
+#alias ports='netstat -tulanp'
+
+## Add safety nets
+## 	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'
+
+## Get system memory, cpu usage, and gpu memory info quickly
+## pass options to free
+alias meminfo='free -m -l -t'
+
+## get top process eating memory
+#alias psmem='ps auxf | sort -nr -k 4'
+#alias psmem10='ps auxf | sort -nr -k 4 | head -10'
+
+## get top process eating cpu ##
+#alias pscpu='ps auxf | sort -nr -k 3'
+#alias pscpu10='ps auxf | sort -nr -k 3 | head -10'
+
+## Get server cpu info ##
+#alias cpuinfo='lscpu'
+
+## older system use /proc/cpuinfo ##
+#alias cpuinfo='less /proc/cpuinfo' ##
+## get GPU ram on desktop / laptop##
+#alias gpumeminfo='grep -i --color memory /var/log/Xorg.0.log'
+
+
+