Just think it might be fun to share Aliases and bashrc files. Perhaps some of you
gearheads don't even use bash anymore? It would be nice to see what nifty aliases
you folks have created.
hello KernSpy and yours? you currently have a great avatar.
. here and hithere. b e t t y @ b o o p H . o m e , Workgroup =NONEJOINED. errrr, can we start another thread about favorite passwords? That's where we really shine.
I used to have an alias to create a list of all installed software but had to change it to a script so that LuckyBackup would run it when I did my back ups. Others have added on to the original to do the same thing but create slightly different outputs.
# inxi
alias inF="inxi -F"
alias inS="inxi -s"
alias inW="inxi -xxx -W Thessaloniki,Greece"
alias inG="inxi -G"
alias inR="inxi -r"
alias inP="inxi -plou"
alias inA="inxi -A"
alias inI="inxi -i"
alias inN="inxi -nx"
alias inD="inxi -xx -S"
alias inFx="inxi -Fxx"
# Various
alias df="df -Th"
alias du="du -h -c > sizes.txt"
alias ins="dpkg -l > installed.txt"
#Git commands
alias gfu="git fetch upstream"
alias gmu="git merge upstream/master"
alias gadd="git add ."
alias grm="git rm"
alias gcom="git commit -m"
alias gpom="git push origin master"
alias gstat="git status"
alias gdiff="git diff"
alias glog="git log"
alias gdiffh="git diff HEAD^"
# Creates an archive from given directory
mktar() { tar cvf "${1%%/}.tar" "${1%%/}/"; }
mktgz() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; }
mktbz() { tar cvjf "${1%%/}.tar.bz2" "${1%%/}/"; }
# Easy extract
# uncompress depending on extension...
extract() {
if [ -f "$1" ] ; then
case "$1" in
*.tar.bz2) tar xvjf "$1" ;;
*.tar.gz) tar xvzf "$1" ;;
*.tar.xz) tar xvJf "$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"
return 1
;;
esac
else
echo "'$1' is not a valid file"
return 1
fi
return 0
}
anticapitalista
Reg. linux user #395339.
Philosophers have interpreted the world in many ways; the point is to change it.