All commands (14,187)

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

List files opened by a PID
Lis all files opened by a particular process id. "PID"

Rapidly invoke an editor to write a long, complex, or tricky command
Next time you are using your shell, try typing ctrl-x e (that is holding control key press x and then e). The shell will take what you've written on the command line thus far and paste it into the editor specified by $EDITOR. Then you can edit at leisure using all the powerful macros and commands of vi, emacs, nano, or whatever.

ANSI 256 Color Test
Terminal Color tester using python, works with py2 and 3

strips the first field of each line where the delimiter is the first ascii character

aptbackup restore
Use when aptbackup will not start or you just want to see what's going on.

Figure out what shell you're running
short, sweet, and works after sudoing a new shell.

Synchronise a file from a remote server
You will be prompted for a password unless you have your public keys set-up.

Perl Command Line Interpreter
Can also just use the debug mode like this.

Show the key code for keyboard events include the Fn keys
The keycodes are a result of pressing: Mute (Fn+F1) a

Quickest way to sort/display # of occurences


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: