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

check open ports without netstat or lsof

Copy something to multiple SSH hosts with a Bash loop
Just a quick and simple one to demonstrate Bash For loop. Copies 'file' to multiple ssh hosts.

Go to the Nth line of file

Cleanup debian/ubuntu package configurations
Sometimes, simpler is better.

UPS Tracking Script

Terminal - Show directories in the PATH, one per line with sed and bash3.X `here string'

Nginx - print all optional modules before compilation
wget http://nginx.org/download/nginx-1.15.3.tar.gz && tar -xzf 1.15.3.tar.gz && cd nginx-1.15.3

Extract title from HTML files
Case Insensitive! and Works even if the "<title>...</title>" spans over multiple line. Simple! :-)

execute your commands and avoid history records
$ secret_command;export HISTCONTROL= This will make "secret_command" not appear in "history" list.

Remove a line from a file using sed (useful for updating known SSH server keys when they change)
For example, to remove line 5 from foo, type: vi +5d +wq foo


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: