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

"Clone" a list of installed packages from one Debian/Ubuntu Server to another

Find and list users who talk like "lolcats"
Greps IRC logs for phrases and lists users who said them.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Find only *.doc and *xls files on Windows partition
When using regex - there is no need to use -o and 2nd regex.

Consolle based network interface monitor
ethstatus part of ethstatus package, is a consolle based monitor for network interfaces. Nicely display on screen a real time summary about bandwidth, speed and packets.

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"

Do the last command, but say 'y' to everything
I doubt this works with other than bash, but then again, I havent tried. The 'yes' utility is very simple, it outputs a hell of a lot of 'y's to standard input. The '!!' command means 'the last command'. So this one-lines inputs a lot of y's into the last command, aggressively agreeing to everything. For instance, when doing apt-get.

Sort files in folders alphabetically
Creates one letter folders in the current directory and moves files with corresponding initial in the folder.

See system users

Create a tar archive using xz compression
Compress files or a directory to xz format. XZ has superior and faster compression than bzip2 in most cases. XZ is superior to 7zip format because it can save file permissions and other metadata data.


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: