Like i said, i havent test it yet, all becouse my internet its soo slow, if you try and works please share, also be nice to do it using the direct url link. Show Sample Output
executed on SLES 11.2
This is a little trickier than finding the last Sunday, because you know the last Sunday is in the first position of the last line. The trick is to use the NF less than or equal to 7 so it picks up all the lines then grep out any empty lines. Show Sample Output
kded --version return this Qt: 3.3.8b KDE: 3.5.10 KDE Daemon: $Id: kded.cpp 711061 2007-09-11 09:42:51Z tpatzig $ awk -F: ................. Awk Field separator NR == 2 ................. Register Number, second line {print $2} ............... second field sed 's/\s\+//g' .......... remove one space or more \s\+ changing by nothing Show Sample Output
I make an extensive use of sudo, so I had to exclude the sudo part of the command history
Probably more trouble than its worth, but worked for the obscure need.
I have some problems with gnome panel which does not load completely leaving me without the actual GUI. This commands helps to kill the gnome-panel process then it should be relaunch automatically.
Linux specific, requires iproute2 (but most distros have that by default now)
BASH: Print shell variable into AWK
This command counts the number of blocked NGINX processes every 2 seconds and shows the last 22 measurements You should have at least the number of cpu's in a non-blocked state. The command up to the first ; truncates the log file. Show Sample Output
This command is useful when you want to check your nic's mac address, if you're interested in your wireless interface, use its ID instead "eth". This command was tested under Ubuntu and Slackware GNU/Linux. Show Sample Output
I used this to mass install a lot of perl stuff. Threw it together because I was feeling *especially* lazy. The 'perl' and the 'module' can be replaced with whatever you like.
I use this command, within a cron job, to kill XMMS after a certain amount of time. This command returns the PID used by XMMS, and gets passed to the kill command. Another alternative would be ps aux | grep xmms | grep -v grep | awk '{ print $2 }' | xargs kill
Broaden your knowledge of the utilities available to you in no particular order whatsoever! Then use that knowledge to create more nifty one-liners that you can post here. =p Takes a random number modulo the number of files in $dir, prints the filename corresponding to that number, and passes it as an argument to man.
Find your default gateway and print it directly output http://www.bilgisayarmatematik.com/ kerim@bayner.com Show Sample Output
2d6 dice:
awk 'BEGIN { srand(); a=int(rand()*6)+1; b=int(rand()*6)+1; print a " + " b " = " a+b }'
3 + 6 = 9
Show Sample Output
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: