Notices by Command Line Magic (climagic), page 2
-
echo "Would you like to play a game?" | (espeak || say -v Fred) # Well would you? #wargames30
-
The problem with SSD drives is you can't hear the grinding of a disk IO heavy process getting carried away.
-
for i in {1..99}; do echo "$i Enter to continue or Ctrl-C to stop."; read; done # You can use 'read' as a way to step through for loops.
-
ascii || man ascii # Quick access to the ASCII character table either through the ascii program or the man page if you don't have the prog.
-
pv bigdump.sql.gz | gunzip | mysql # restore a #mysql dump with progressbar and ETA. Thx @skygreg
-
awk -F: '$NF == "/bin/tcsh" {print $1}' /etc/passwd # If the last field matches /bin/tcsh (shell), then print the first field (username)
-
Happy Birthday Marc Ewing @marcewing, creator of Red Hat Linux and also the origin of its name (he wore the red hat).
-
Tip by @rythie: pick up where you left off, put "echo $PWD > ~/.pwd" in .bash_logout and "OLDPWD=$(cat ~/.pwd)" in .bashrc, then "cd -"
-
(cmd1;cmd2;cmd3) # When running commands in a subshell, you can use job control (Ctrl-C, Ctrl-Z, fg, bg) on the subshell as a whole unit.
-
http://bit.ly/11iO00y # @creaktive has expanded the rainbarf program so that it can work in the zsh PS1 prompt. Animated prompt!
-
convert -size 1280x720 plasma:green-blue background.png # Create a 1280x720 color plasma image. Different each time. Uses ImageMagick
-
export LESS="-S -j10 -i" # This environment variable will invoke 'less' with these options when it is used. Like when viewing a man page.
-
less -j10 /var/log/syslog # Set the search jump target to 10 lines down so that you see 9 previous lines of context on searches within less.
-
:w !sudo tee % # overwrite file in vim with root perms. This stackexchange page http://bit.ly/Yqmmuy explains how that works. Thx @shugelee
-
scrot -s tmp.png ; display tmp.png # Take a screenshot of a selected part of a window or selected part of screen and display it.
-
RT @isafarnik: Use #cygwin? ctrl+click on URLs in mintty.exe will open them in a browser #headexplode
-
":-P" -- Albert Einstein
-
while sleep 1m;do [[ "$(date +%l:%M%P)" == "10:00pm" ]]&&echo "Its 10pm, do you know where your children are?"|(espeak||say);done # Its 10pm
-
while :;do t=($(date +"%l %M %P")); [[ "${t[1]}" == 0 ]] && echo "${t[0]} ${t[2]}" |(espeak||say); sleep 1m; done # Speak the hour
-
while stat -c"%s" .vm1.img.zYGFiZ; do sleep 15; done; sleep 30; stat vm1.img && virsh define vm1.xml && virsh start vm1 # Start after rsync.