====== Bash Alias ====== Displays a reminder message at the specified time echo "DISPLAY=$DISPLAY xmessage convert db to innodb" | at 00:00 Define a quick calculator function =() { echo $(($*)); } Define a quick calculator function ? () { echo "$*" | bc -l; } Copy structure cd $srcdir && find -type d -exec mkdir -p $dstdir/{} \; View advanced Sort options, Quick Reference Help Alias alias sorth='sort --help|sed -n "/^ *-[^-]/s/^ *\(-[^ ]* -[^ ]*\) *\(.*\)/\1:\2/p"|column -ts":"' View all date formats, Quick Reference Help Alias alias dateh='date --help|sed -n "/^ *%%/,/^ *%Z/p"|while read l;do F=${l/% */}; date +%$F:"|'"'"'${F//%n/ }'"'"'|${l#* }";done|sed "s/\ *|\ */|/g" |column -s "|" -t' Show ls colors with demo echo $LS_COLORS | sed 's/:/\n/g' | awk -F= '!/^$/{printf("%s \x1b[%smdemo\x1b[0m\n",$0,$2)}' today’s Debian installed packages grep -e $(date +%Y-%m-%d) /var/log/dpkg.log | awk '/install / {print $4}' | uniq Create a bash script from last n commands history | tail -(n+1) | head -(n) | sed 's/^[0-9 ]\{7\}//' >> ~/script.sh