Get short, timely messages from Command Line Magic.
Twitter is a rich source of instantly updated information. It's easy to stay updated on an incredibly wide variety of topics. Join today and follow @climagic.
Get updates via SMS by texting follow climagic to 40404 in the United States Codes for other countries
Two-way (sending and receiving) short codes:
Country
Code
For customers of
Australia
0198089488Telstra
Canada
21212(any)
United Kingdom
86444Vodafone, Orange, 3, O2
Indonesia
89887AXIS, 3, Telkomsel
Ireland
51210O2
India
53000Bharti Airtel, Videocon
Jordan
90903Zain
New Zealand
8987Vodafone, Telecom NZ
United States
40404(any)
climagic
The "line" command comes with util-linux on my machine, so I guess some of you may not have that command. Sorry.about 12 hours agovia CLI Magic poster
command line <<<magic # Not that it does much, but this command actually runs without error in BASH at least. ;-)about 12 hours agovia CLI Magic poster
chkconfig --list | grep 3:on # Check what services are setup to start up in run level 3 on a Red Hat based system.about 14 hours agovia CLI Magic poster
sed sentence<<<commented # This is another "alternate demarcation" example that is just a word and produced another word (commenced)about 14 hours agovia CLI Magic poster
sed s/a/emen/<<<dated # That last one may not have been obvious but its basically the same as doing this.about 14 hours agovia CLI Magic poster
sed statement<<<dated # Cool & useful. sed allows you to use other characters to demarcate sections. In this case, 't'. Thx @brimston3about 17 hours agovia CLI Magic poster
echo $(($(ssh REMOTEHOST date +%s) - $(date +%s))) # Tell me how many seconds a server's clock is off compared to localhost. Thx @msquadrat12:57 PM May 31stvia CLI Magic poster
RT @sionide21: date; while ps -p $PID > /dev/null; do sleep 1; done; date # Quick and dirty timing of already started long running process11:54 AM May 31stvia HootSuite
iMartyn@climagic for f in *; do if echo `file $f` | grep broken >/dev/null 2>/dev/null; then rm $f; fi; done # remove dangling symlinks from a dir6:48 AM May 31stvia webRetweeted by climagic and 1 other
last reboot # See the last several times your system was rebooted. Reboot == that thing you do once in a while for kernel upgrades.1:24 PM May 30thvia CLI Magic poster
fgrep 28/May/2012 access_log | awk '$1~/\.[a-z][a-z]$/{print $6 " " $7}' # For May 28th, print the req fields for hosts from two letter gTLD11:10 AM May 30thvia CLI Magic poster
tmux split top # Start "top" in a split window inside your current #tmux session. You can even do this remotely or from the tmux cmd prompt.9:58 AM May 30thvia CLI Magic poster
echo "export LIBOVERLAY_SCROLLBAR=0" >> ~/.xprofile # Logout/Login required. Will give you back your scrollbars in Ubuntu. Thx @rafaelsdm7:46 AM May 30thvia CLI Magic poster