Commands using sort (800)

What's this?

commandlinefu.com 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

Connect to TCP port 5000, transfer data and close connexion.
With no '-q 0' switch, nc simply waits, and whatever awaits the data hangs.

Scale,Rotate, brightness, contrast,...with Image Magick
$rotate: the rotate angle $width, $height: width and height to scale to $birghtness: change brighness

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

split large video file
i have a large video file, 500+ MB, so i cant upload it to flickr, so to reduce the size i split it into 2 files. the command shows the splitting for the first file, from 0-4 minutes. ss is start time and t is duration (how long you want the output file to be). credit goes to philc: http://ubuntuforums.org/showthread.php?t=480343 NOTE: when i made the second half of the video, i got a *lot* of lines like this: frame= 0 fps= 0 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbit just be patient, it is working =)

Realtime lines per second in a log file
Displays the realtime line output rate of a logfile. -l tels pv to count lines -i to refresh every 10 seconds -l option is not in old versions of pv. If the remote system has an old pv version: ssh tail -f /var/log/apache2/access.log | pv -l -i10 -r >/dev/null

dd with progress bar and statistics to gzipped image
This is a useful command to backup an sd card with relative total size for piping to pv with a progressbar

List just the executable files (or directories) in current directory
A bit shorter ;)

encrypt and post or get and decrypt from sprunge using gpg symmetric encryption option
create simple encrypted notes to yourself using a passphrase on sprunge.us

archlinux: shows list of files installed by a package
Shows the files which the package, for example gvim, installed on your system.

Date shows dates at other times/dates
Use date to find the date at other days and times.


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.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

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: