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

Execute a command at a given time
This command will create a popup reminder window to assist in remembering tasks http://i.imgur.com/2n7viiA.png is how it looks when created

Remove the first character of each line in a file

Create an alias, store it in ~/.bash_aliases and source your new alias into the ~/.bashrc
This is useful if you use a shell with a lot of other users. You will be able to run "topu" to see your running processes instead of the complete 'top -u username'. Read more on alias: http://man.cx/alias

burn an ISO image to writable CD
Does life get much easier? Read up about wodim for an understanding of its origins in relation to the older `cdrecord` utility

Count TCP States From Netstat
Counts TCP states from Netstat and displays in an ordered list.

interactive rss-based colorful commandline-fu reader perl oneliner (v0.1)
required packages: curl, xml2, html2text command is truncated, see 'sample output'

vi a remote file with port
If you are running sshd on different port use above this command to edit/view remote file with vi/vim. In above example I am using port 12345.

Extracting a range of pages from a PDF, using GhostScript
In this example we extract pages 14-17

grep (or anything else) many files with multiprocessor power
Parallel does not suffer from the risk of mixing of output that xargs suffers from. -j+0 will run as many jobs in parallel as you have cores. With parallel you only need -0 (and -print0) if your filenames contain a '\n'. Parallel is from https://savannah.nongnu.org/projects/parallel/

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"


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: