commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Using our beloved wget
Usage: clfavs username password num_favourite_commands file_in_which_to_backup
"get Hong Kong weather infomation from HK Observatory
From Hong Kong Observatory wap site ;)"
other one showed alot of blank lines for me
From Hong Kong Observatory wap site ;)
Returns a JSON object, by connecting to the 'test' endpoint of the Twitter API. Simplest way to check if you can connect to Twitter. Output also available in XML, use '/help/test.xml' for that
I don't know if the --spider option works to execute a script, but it might be worth trying. Note that the Drupal project uses the following in a cron job.
wget -O - -q http://localhost/drupal/cron.php
The output is sent to standard out so it can be logged by cron.
I have a remote php file that I want to run once an hour. I set up cron to run this wget. I don't really care about what's in the file though, I don't want to save the results, so I run the -O and send it to /dev/null
xargs can be used in this manner to download multiple files at a time, and xargs will in this case run 10 processes at a time and initiate a new one when the number running falls below 10.
If the site uses https, use:
wget --reject html,htm --accept pdf,zip -rl1 --no-check-certificate https-url
Copy the link to an HD movie trailer in to this command. It's more eleganant if it's put in a to a script, taking the URL as input.
to download latest version of "util", maybe insert a sort if they wont be shown in right order.
curl lists all files on mirror, grep your util, tail -1 will gets the one lists on the bottom and get it with wget
This will download all the phracks! Enjoy!
Can be used to help perform some SEO optimizations.
I dont have curl or links installed, so I use wget with write file as standard out.
This lengthy cryptic line will print the latest top 10 commandlinefu.com posts without their summaries. To print also their respective summaries use the following (even bigger) command line:
wget -qO - http://www.commandlinefu.com/feed/tenup | xmlstarlet sel -T -t -o '<doc>' -n -t -m rss/channel/item -o '<item>' -n -o '<title>' -v title -o '</title>' -n -o '<description>' -v description -o '</description>' -n -o '</item>' -n -t -o '</doc>' | xmlstarlet sel -T -t -m doc/item -v description/code -n -v title -n -n
It is recommended to include this line into a shell script to be easily run, as I do myself. You could also use the following URLs to browse the top 3 commands:
wget -qO - http://www.commandlinefu.com/feed/threeup | xmlstarlet ...
.. or all others:
wget -qO - http://feeds2.feedburner.com/Command-line-fu | xmlstarlet ...
PS: You need to install "xmlstarlet" to run it. It is found in Debian APT repositories (apt-get install xmlstarlet) or under the http://xmlstar.sourceforge.net/ URL.
I wanted all the 'hidden' .flv files from the http link in the command line; wget seemed appropriate, fed with output from lynx, grep the flv files and the normalised via sed (to remove the numeric bullet). Similar to the 'Grab mp3 files' fu. Replace link with your own, grep arg with something more interesting ;) See here for something along the same lines...
Hope you find it useful! Improvements welcome, naturally.
Just copy and paste the code in your terminal.
Note : sudo apt-get for debian versions , change as per your requirement .
Source : www.h3manth.com
substitute the URL with your private/public XML url from calendar sharing settings
substitute the dates YYYY-mm-dd
adjust the perl parsing part for your needs