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:
Post a message on another users screen via SSH
Merge Multiple PDFs In Alphabetical Order
Batch resize all images to a width of 'X' pixels while maintaing the aspect ratio.
This makes uses of ImageMagick to make life easier.
You need to install "sshpass" for this to work.
apt-get install sshpass
Make sure the file you use in your test is > 50mb to get good results.
sudo apt-get install lftp iperf
An easy method to generate ISOs from CD/DVD media.
Grabs your external public IP.
Make your own MP3s from Youtube videos.
- grep for the word in a files, use recursion (to find files in sub directories), and list only file matches
-| xargs passes the results from the grep command to sed
-sed -i uses a regular expression (regex) to evaluate the change: s (search) / search word / target word / g (global replace)
A video capture command which can be assigned to a keyboard shortcut.
Batch Convert MP3 Bitrate to xxxkbps, all the new files will be placed in a folder called "save". Please replace xxx with the desired bitrate. WARNING!!! This will erase any tag information; this is where Picard or EasyTAG will come in handy.
Check your local temperature based on geolocation.
This command will determine an individuals local weather, based on their I.P. address. I had to learn a lot about SED and a little about XMLStarlet in order to achieve this. This command is my original work and there is much room for improvement; I look forward to any constructive feedback.
A command to post a message to Twitter that includes your geo-location and a short URL. The link shortening service is provide by TinyURL, the geo-location service is provided by HostIP and the IP address lookup service is provided by AppSpot. This is an upgrade of an of one of my previous contributions: http://tinyurl.com/yd2xtzv.
This command will shorten any URL the user inputs. What makes this command different is that it utilizes 5 different services and gives you 5 different outputs: is.gd, bit.ly, u.nu, geekology.co.za, and tinyurl.
curl -s http://tinyurl.com/create.php?url=$1 \ | sed -n 's/.*\(http:\/\/tinyurl.com\/[a-z0-9][a-z0-9]*\).*/\1/p' \ | uniq ; curl -s http://bit.ly/?url=$1 \ | sed -n 's/.*\(shortened-url" value="http:\/\/bit.ly\/[a-zA-Z0-9][a-zA-Z0-9]*\).*/\1/p' \ | sed -n 's/.*\(http:\/\/bit.ly\/[a-zA-Z0-9][a-zA-Z0-9]*\).*/\1/p' \ | uniq ; curl -s http://geekology.co.za/shortii/create.php?u=$1 \ | sed -n 's/.*\(http:\/\/geekology.co.za\/[a-z0-9][a-z0-9]*\).*/\1/p' \ | uniq ; curl -s http://u.nu/unu-api-simple?url=$1 \ | sed -n 's/.*\(http:\/\/u.nu\/[a-z0-9][a-z0-9]*\).*/\1/p' \ | uniq ; curl -s http://is.gd/api.php?longurl=$1 \ | sed -n 's/.*\(http:\/\/is.gd\/[a-z0-9][a-z0-9]*\).*/\1/p' \ | uniq echo ""
A command to post a message and an auto-shortened link to Twitter. The link shortening service is provided by TinyURL.