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

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"

Mount windows share to the specified location including credentials
Replace IP address with yours IP.

Downmix first audio stream from 7.1 to 5.1 keeping all other streams
Useful for Roku which does not support 7.1. Useful resources: - https://trac.ffmpeg.org/wiki/Map - https://trac.ffmpeg.org/wiki/Encode/HighQualityAudio - https://superuser.com/questions/852400/properly-downmix-5-1-to-stereo-using-ffmpeg

Convert a script to one-liner
Opposite: Convert an one-liner to script: $ foo() { ; } ... $ typeset -f foo ... $ unset -f foo

strace like SystemTap script
The stap script is : #! /usr/bin/env stap probe syscall.* { if (pid() == target()) printf("%s %s\n", name, argstr); }

record the input of your sound card into ogg file
save the input into a ogg file

On Mac OS X, runs System Profiler Report and e-mails it to specified address.
Replace "user@domain.com" with the target e-mail address. Thanks to alediaz for "$HOSTNAME" which is very useful when running the command with Apple Remote Desktop to multiple machines simultaneously.

List all installed PERL modules by CPAN
This command will give you the detailed information about the installed perl modules i.e. installed path, Link type, version, files etc.

ls not pattern
Negative shell globs already come with bash. Make sure to turn on extended pattern matching with 'shopt -e extglob'.

delay: a simple scheduler
the "delay" utility is an invaluable tool for me. with gnu-screen it allows you to schedule something and have it run and output to the current terminal, unlike "at". You can also use it like "sleep" with seconds and also with date: delay until 13:33 friday && echo test get it from: http://onegeek.org/~tom/software/delay/current/delay.c (author: Tom Rothamel)


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: