Sunday, December 27, 2009

Shell script to post twit.

For posting a simple twit, I had to go on twitter every time, But for lazy person like me, Its too tough. I was looking for a simple tool to post twit. I found a very interesting and simple shell script to post twit from Linux command line.

*Install "curl" if you don't have already.
       #yum install curl
*Copy the colored code and save as twit.sh
*Replace USER with your Twitter A/c's user name and PASSWORD with password.
*make twit.sh executable.
       #chmod +x twit.sh

Your script is ready to post messages.Go to terminal. Use the following command.
$sh twit.sh "Your Message here."


------------------------script start  here--------------------------------------

#!/bin/bash
curl -u USER:PASS -d status="$*" http://twitter.com/statuses/update.xml > /dev/null
echo "Message posted successfully."
----------------------------------------------------------------------------------------- 
Note- This tutorial is for Redhat and Fedora Linux, although you can use this script on any distro if you have "curl" installed on your machine. To install curl on your distro look their installation manual.

Read more…

Thursday, December 24, 2009

How fast is your Thumb Drive ?

There are lot of tools available to check data transfer rate in Windows. But on Linux  you can check data transfer rate by just using one command.


Open Terminal.
Application >System Tools > Terminal.
Login with super user credential.
$su
password : (root password)



#hdparm -t /dev/sdb (in my case sdb is pendrive)

/dev/sdb:
Timing buffered disk reads:   60 MB in  3.00 seconds =  19.98 MB/sec





For detail usage of hdparm command go to terminal and type

#man hdparm
or
#hdparm --help

Note - Some command can be dengerous, Please use them carefully.

Read more…