Never Ending Security

It starts all here

Some Bash and Arch Tweaks

So, I have some nice tips for your .bashrc, with screenshots. Also a handy command to show your biggest packages in pacman/arch.

Simple Calendar with today marked as ##


alias tcal='cal | sed "s/^/ /;s/$/ /;s/ $(date +%e) / $(date +%e | sed '''s/./#/g''') /"' 
Fast cd up:
alias ..='cd ..'
alias ...='cd ../..' 
Network Info (LAN IP, IP and MAC):


netinfo ()
echo "Internal IPv4 address of eth0: "; ifconfig | grep 'inet addr:'| grep -v '' | cut -d: -f2 | awk '{ print $1}'
echo "External IPv4 address: "; wget -q -O -|sed -e 's/.*Current IP Address: //' -e 's/
Biggest folders in directory Gigabyte version:


alias dug='du -h | grep ^[0-9.]*G | sort -rn | head -n 20'
Biggest folders in directory Megabyte version:


alias dum='du -h | grep ^[0-9.]*M | sort -rn | head -n 20'
Process Grep:


alias pg='ps -ef | grep '
Nice greeting when opening a bash shell:


PS1="u@h  -  tn${PWD}/ -$ "
echo "Welkom Remy,"
echo "Het is vandaag:";
echo "Deze PC draait op een:" 
/bin/uname -p
echo ""

(put this one at the end of your .bashrc file)

And the huge packages finder:


pacman -Qi | awk '/Name/ { name=$3 } /Size/ { printf "%.3fMBt%sn", $4/1024, name }' | sort -rh | head -n $1
exit 0

(I’ve put this in /usr/bin/dup and chmodded it to 755).

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s