cURL – Tutorial

2010-09-15 1 min read Bash Fedora Linux

Here are linkw to two nice tutorials on curl and how to use curl to login before we try to fetch a page. Hope you find them useful.
http://curl.haxx.se/docs/httpscripting.html

http://www.youtube.com/watch?v=XcgQUsorF_8

http://scriptasy.com/php_11/tutorial-curl-login_44.html

Enhanced by Zemanta

Over 50 Free, Must-Have Open Source Resources

2010-07-27 0 min read Linux
\"no
Image via Wikipedia

OStatic: ”n this post, you’ll find an updated set of more than 45 collections and resources. Hopefully, you’ll find something to learn from here, and the good news is that everything found in this post is free.”

<a class="zem_slink freebase/guid/9202a8c04000641f800000000003f3a0" title="Uniform Resource Locator" rel="wikipedia" href="http://en.wikipedia.org/wiki/Uniform_Resource_Locator">URL: <a href="http://linuxtoday.com/news_story.php3?ltsn=2009-11-23-003-35-RV-SW">http://linuxtoday.com/news_story.php3?ltsn=2009-11-23-003-35-RV-SW<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://technology.johnsamuel.in/main/index.php/2009/10/25/bit-ly-more-than-just-a-url-shortener/">bit.ly: More than just a URL shortener (technology.johnsamuel.in) <div class="zemanta-pixie"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/01000062-d486-42d2-bd70-1cb729684b22/"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_b18.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">

Continue reading

Using tput to save, clear and restore the terminal contents

2010-06-17 1 min read Linux

Using tput to save, clear and restore the terminal contents $ tput smcup; echo &#8221;Doing some things…&#8221;; sleep 2; tput rmcup Very useful for interactive scripts where you would like to return the terminal contents to its original state before the script was run. This would be similar to how vi exits and returns you to your original terminal screen.

Save and clear the terminal contents with:

tput smcup

Continue reading

Delete all files in a folder that don't match a certain file extension

2010-04-30 1 min read Bash Fedora Linux

$ rm !(.foo|.bar|*.baz)

Deletes all files in a folder that are NOT *.foo, *.bar or *.baz files. Edit the pattern inside the brackets as you like.

  • <a href="http://www.commandlinefu.com/commands/view/5351/delete-all-files-in-a-folder-that-dont-match-a-certain-file-extension">View this command to comment, vote or add to favourites
  • <a href="http://feeds2.feedburner.com/commands/by/hutch">View all commands by <a href="http://feeds2.feedburner.com/commands/by/hutch">hutch

<a href="http://www.commandlinefu.com"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/header-logo.jpg" alt="" align="bottom" />

by David Winterbottom (<a href="http://codeinthehole.com">codeinthehole.com)

<a href="http://feedads.g.doubleclick.net/~a/kewaFMgsXI4A1vQfeLscg2Vcv8o/0/da"><img src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~a/kewaFMgsXI4A1vQfeLscg2Vcv8o/0/di" alt="" align="bottom" />
<a href="http://feedads.g.doubleclick.net/~a/kewaFMgsXI4A1vQfeLscg2Vcv8o/1/da"><img src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~a/kewaFMgsXI4A1vQfeLscg2Vcv8o/1/di" alt="" align="bottom" />

<img src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/~r/Command-line-fu/~4/TCRb2ku_V1Y" alt="" width="1" height="1" align="bottom" />

Continue reading

Lock the hardware eject button of the cdrom

2010-04-29 1 min read Fedora Learning Linux

$ eject -i 1 This command will lock the hardware eject button of your cdrom drive. Some uses are:

1: If you have a toddler and has discovered the cdrom button

2: If you are carrying a laptop in a bag or case and don&#8217;t want it to eject if the button is inadvertently pressed.

To unlock the button use:

eject -i 0

  • <a href="http://www.commandlinefu.com/commands/view/5390/lock-the-hardware-eject-button-of-the-cdrom">View this command to comment, vote or add to favourites
  • <a href="http://feeds2.feedburner.com/commands/by/mdelatorre">View all commands by <a href="http://feeds2.feedburner.com/commands/by/mdelatorre">mdelatorre

<a href="http://www.commandlinefu.com"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/header-logo.jpg" alt="" align="bottom" />

Continue reading