Timeline for cli list by gnusay
-
last reboot # See the last several times your system was rebooted. Reboot == that thing you do once in a while for kernel upgrades.
-
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 gTLD
-
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.
-
echo "export LIBOVERLAY_SCROLLBAR=0" >> ~/.xprofile # Logout/Login required. Will give you back your scrollbars in Ubuntu. Thx @rafaelsdm
-
printf "$( cat /sys/class/power_supply/BAT?/{voltage,current}_now) * 10 12 ^ 3 k / p" |dc # Show battery power drain (linux) Thx @telent_net
-
http://ur1.ca/9elqi # CLIMagic 2012 Survey results are out. Everyone is special in some way.
-
The reason I do it this way is because the cut command can't be used with 'tail -f' like this due to output buffering issues.
-
means that it will pass a literal $ to awk and thus use awk's $0, which means the whole line.
-
In that last one, I needed the $COLUMNS variable from bash, but the $0 from awk, so by using "", I let the $COLUMNS through and backslash ..
-
tail -f log |awk "{print substr(\$0,0,$COLUMNS)}" # Cut log to width of your term. Note use of quotes. COLUMNS is BASH variable.
-
Happy CLI Day 2012! http://ur1.ca/9eijs
-
for i in 0 1 2; do mdadm --remove /dev/md$i /dev/sdb$(($i+1)); done # A nice one-liner @kaerast used to remove a failed disk from raid.
-
cowsay 'Happy Birthday!' | toilet -f term --gay # Cow says Happy Birthday! in rainbow colors.
-
exec -a vim nethack # Now if your boss runs ps aux on your system, they will think you're working, not playing a game.
-
Of course, 3133700000 will be the mother of all epoch dates. April 20th, 20[69] and Unix will be 99.9 years old too. Quite a convergence.
-
date +%s # Speaking of date, today is the last day you'll see the 1337 prefix in the Unix epoch. Next time will be in 2393. #hackerhalfmonth
-
date -d 2011-11-21 +%A # What day of the week was November 21st, 2011 on? This requires GNU date for the -d option.
-
acronym(){ elinks -no-numbering -dump "http://ur1.ca/5zdvm" |sed -r '/(\*{4,}|This definition)/!d'; } # acronym TIMTOWTDI
-
BTW, next Tuesday, May 29th is CLI Day: http://ur1.ca/9dh2j Thanks @stormdragon2976
-
zipcode="90210";elinks -dump "http://ur1.ca/9dgn5{zipcode}" | grep -A 4 "Current " # Current weather. Thx @stormdragon2976