Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------------------------------------------------------
- # Prompt
- #-------------------------------------------------------------
- PS1="\[\033[40m\]\[\033[1;32m\]\$(date +%H:%M:%S) \u@\h \w$ "
- #-------------------
- # Personal Aliases
- #-------------------
- alias rm='rm -i'
- alias cp='cp -i'
- alias mv='mv -i'
- alias mkdir='mkdir -p'
- alias du='du -kh'
- alias df='df -kTh'
- alias ll="ls -l --group-directories-first"
- alias ls='ls -hal' # add colors for filetype recognition
- alias la='ls -Al' # show hidden files
- alias lx='ls -lXB' # sort by extension
- alias lk='ls -lSr' # sort by size, biggest last
- alias lc='ls -ltcr' # sort by and show change time, most recent last
- alias lu='ls -ltur' # sort by and show access time, most recent last
- alias lt='ls -ltr' # sort by date, most recent last
- alias lm='ls -al |more' # pipe through 'more'
- alias lr='ls -lR' # recursive ls
- alias tree='tree -Csu' # nice alternative to 'recursive ls'
- function extract() # Handy Extract Program.
- {
- if [ -f $1 ] ; then
- case $1 in
- *.tar.bz2) tar xvjf $1 ;;
- *.tar.gz) tar xvzf $1 ;;
- *.bz2) bunzip2 $1 ;;
- *.rar) unrar x $1 ;;
- *.gz) gunzip $1 ;;
- *.tar) tar xvf $1 ;;
- *.tbz2) tar xvjf $1 ;;
- *.tgz) tar xvzf $1 ;;
- *.zip) unzip $1 ;;
- *.Z) uncompress $1 ;;
- *.7z) 7z x $1 ;;
- *) echo "'$1' cannot be extracted via >extract<" ;;
- esac
- else
- echo "'$1' is not a valid file"
- fi
- }
- function ii() # Get current host related info.
- {
- echo -e "\nAdditional information:$NC " ; uname -a
- echo -e "\n${RED}Users logged on:$NC " ; w -h
- echo -e "\n${RED}Current date :$NC " ; date
- echo -e "\n${RED}Machine stats :$NC " ; uptime
- echo -e "\n${RED}Memory stats :$NC " ; free
- echo -e "\n${RED}Open connections :$NC "; netstat -pan --inet;
- echo
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement