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

Kill any lingering ssh processes
Also ignoring "sshd" server is necessary since you should not kill ssh server processes.

history autocompletion with arrow keys
This will enable the possibility to navigate in the history of the command you type with the arrow keys, example "na" and the arrow will give all command starting by na in the history.You can add these lines to your .bashrc (without &&) to use that in your default terminal.

climagic's New Year's Countdown clock
This is the 140 character long new year's countdown timer that was posted to the climagic account on twitter and identi.ca. There are saner ways of doing this of course, but probably none of those would fit. Uses the figlet command, but of course you can replace figlet with just echo if you want.

Get current logged in users shortname

convert ascii string to hex
just a bit simpler

Give webpage status code
this function will give you a status webpage code using curl.

Erase a word

geoip information
Show external IP and geolocation information. Primary feature is the use of tee to echo IP _and_ send to geoiplookup command...Use IP as input for as many commands as you want with more >( [command] ) Thanks to http://www.commandlinefu.com/commands/view/6334/ Requires MaxMind DB and geoiplookup tool. Sample output has IP obfuscated on first line, lines 2-4 from having MaxMind Country && MaxMind City DBs installed

Print IP of any interface. Useful for scripts.

Suspend, background, and foreground a process
1. Start a process, such as 'top' command 2. # suspend process {ctrl-Z} 3. # background process bg 4. # list all backgrounded jobs jobs 5. # bring it back to foreground fg


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: