Bash aliases

A list of useful bash aliases.

Install

  1. git clone git@github.com:semaz/BashAliases.git ~/BashAliases
  2. cd && bash BashAliases/install.sh

Wiki

Description of all settings.

Aliases

functions

c - clear
g - git
l. - list of hidden files
ll - list of all files
lsd - list only directories
root,sudo - sudo -i
ps2 - 'ps -ef | grep -v $$ | grep -i '
psg - 'ps aux | grep -v grep | grep -i -e VSZ -e'
psme - 'ps -ef | grep $USER --color=always '
hg - history|grep
diff - colordiff
composer - 'php /usr/local/bin/composer'

file

f - find file by name
edit - 'open -e'
numFiles - print number of files
~ - 'cd ~'
cd.. - 'cd ..'
.. - 'cd ..'
... - 'cd ../../'
.... - 'cd ../../../'
..... - 'cd ../../../../'
cdl - go to folder and ls
cdla - go to folder and ls -la
finderHiddenShow - OSX Finder show hidden files
finderHiddenHide - OSX Finder hide hidden files
mkdir - 'mkdir -pv'
rmdir - 'rm -rf'
mcd - make dir and go to that dir
cleanupDS - remove all .DS_Store
extract - extract archive

log

tf - run tail -f

network

flushDNS - flush OS X DNS
myip - print yours ip-adress
trace - mtr
openPorts - print all open ports
edithosts - 'sudo nano /etc/hosts'

apt

apt - 'sudo apt-get'
update - 'sudo apt-get update --yes'
upgrade - 'sudo apt-get upgrade'
install - 'sudo apt-get install --yes'
purge - 'sudo apt-get purge --yes'
remove - 'sudo apt-get remove --yes'
distup - 'sudo apt-get dist-upgrade'
updinst - 'sudo apt-get update && sudo apt-get install --yes'
aptsearch - 'apt-cache search'

Vars

export PATH=/usr/local/bin:$PATH
force_color_prompt=yes
export LS_OPTIONS='--color=auto'
export CLICOLOR=1
export TERM="xterm-color"
export PS1='\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ '
export EDITOR=/usr/bin/nano
USER="id -un"