Commands by barrytrujillo (1)

  • documents all active ips on a subnet and saves to txt file. Show Sample Output

    FOR /L %i IN (1,1,254) DO ping -n 1 10.254.254.%i | FIND /i "Reply">> c:\ipaddresses.txt
    barrytrujillo · 2010-06-29 21:02:21 0

What's this? 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.

Share Your Commands

Check These Out

recursively change file name from uppercase to lowercase (or viceversa)
easier way to recursively change files to lowercase using rename instead

Determine if a port is open with bash
For times when netcat isn't available. Will throw a Connection refused message if a port is closed. Scriptable: $ (: /dev/null && echo "OPEN" || echo "CLOSED"

Download a file and uncompress it while it downloads
This will uncompress the file while it's being downloaded which makes it much faster

Determine an image's dimensions
Simple use of ImageMagick identify function.

list block devices
Shows all block devices in a tree with descruptions of what they are.

Converting video file (.flv, .avi etc.) to .3gp
ffmpeg -i = input file name -s = set frame size, qcif=176x144 -vcodec = force video codec -r = frame-rate [default = 25] -b = bit-rate [200 kb/s] -acodec = force audio codec -ab = audio bitrate in bits/s [64k] -ac = no. of audio channels [1] -ar = audio sampling frequency [44100 Hz] optional: -sameq = use same video quality as source (implies VBR) -f = force format -y = overwrite output files

Create A Continuous Yahoo! News Ticker For The Terminal
This creates a permanent stock ticker in the terminal. it has scrolling action and refreshes when each cycle is done to get the latest news.

move you up one directory quickly
Alias a single character 'b' to move to parent directory. Put it into your .bashrc or .profile file. Using "cd .." is one of the most repetitive sequence of characters you'll in the command line. Bring it down to two keys 'b' and 'enter'. It stands for "back" Also useful to have multiple: alias b='cd ../' alias bb='cd ../../' alias bbb='cd ../../../' alias bbbb='cd ../../../../'

Print out a man page
man -t manpagename gives a postscript version of said man page. You then pipe it to ls, and assuming you have cups set up, it prints in your default printer.

Create commands to download all of your Picasaweb albums
Create commands to download all of your Picasaweb albums Install Googlecl ( and authenticate first.

Stay in the loop…

Follow the Tweets.

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.


Subscribe to the feeds.

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: