Uses the Wunderground web API to get weather data. Change the STA variable to a station near you. Show Sample Output
tired of opening tabs and fill in search forms by hand? just pipe the search terms you need into this surfraw loop. you can use any browser you have installed, but a graphical browser with a tabbed interface will come in handy. surfraw can be found here: http://surfraw.alioth.debian.org
This command should be copy-pasted in Windows, but very similar one will work on Linux. It uses wget and sed.
You can use sshpass command to provide password for ssh based login. sshpass is a utility designed for running ssh using the mode referred to as "keyboard-interactive" password authentication, but in non-interactive mode.
For this example, all files in the current directory that end in '.xml.skippy' will have the '.skippy' removed from their names.
Prints out the version of exim Show Sample Output
Reads n lines from stdin and puts the contents in a variable. Yes, I know the read command and its options, but find this logical even for one line. Show Sample Output
See http://dev.mysql.com/doc/refman/5.0/en/myisamchk.html for further details. You can also repair all tables by running:
myisamchk -r *.MYI
The "-k" flag will tell wget to convert links for local browsing; it works with mirroring (ie with "-r") or single-file downloads.
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.
remove files with access time older than a given date. If you want to remove files with a given modification time replace %A@ with %T@. Use %C@ for the modification time. The time is expressed in epoc but is easy to use any other format. Show Sample Output
This may seem like a long command, but it is great for making sure all file permissions are kept in tact. What it is doing is streaming the files in a sub-shell and then untarring them in the target directory. Please note that the -z command should not be used for local files and no perfomance increase will be visible as overhead processing (CPU) will be evident, and will slow down the copy.
You also may keep simple with, but you don't have the progress info:
cp -rpf /some/directory /other/path
Show Sample Output
Remove all empty directories below the current directory. If directories become empty as the results of this, remove those too.
Remove dashes, also validates if it's a valid UUID (in contrast to simple string-replacement)
The number 5 means to replace the leading and trailing 5 characters of an "@" in a log file with XXXX@XXXXX.
If your site is struck with the white screen of death you can find the syntax error quickly with php lint
used to output the last argument. www.fir3net.com 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: