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

Find public IP when behind a random router (also see description)
Depends on GET. You can also replace GET with curl, or `wget -qO -` if GET isn't available.

Locate config files of the program
Locate config files of the program. May not be used for interactive programs like vim.

Show 'Hardware path'-style tree of all devices in Linux

Get all IPs via ifconfig

Spy audio, it only records if detects a sound or noise
It find out the mic recording level at the moment of run the command and if a noise level is higher it starts to record an mp3 file. The resulting file will have only the sounds not the silences.

show all programs connected or listening on a network port
Use the aliased command 'nsl'

get all Google ipv4 subnets for a iptables firewall for example

Human readable directory sizes for current directory, sorted descending

print a file on a single line
Example: you have a package.txt you want to install on a system. Instead of this: cat package.txt package1 package2 package3 You want it to cat out on one line so you can print "yum install package1 package2 package3"

multiline data block parse and CSV data extraction with perl
extract data in multiline blocks of data with perl pattern matching loop


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: