Commands by ella25 (0)

  • bash: commands not found

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

Colorizes an access log
Puts a splash of color in your access logs. IP addresses are gray, 200 and 304 are green, all 4xx errors are red. Works well with e.g. "colorize access_log | less -R" if you want to see your colors while paging. Use as inspiration for other things you might be tailing, like syslog or vmstat Usage: $ tail -f access.log | colorize

Get your external IP address without curl
Curl is not installed by default on many common distros anymore. wget always is :) $ wget -qO- ifconfig.me/ip

Two command output
Summarize established connections after netstat output. Using tee and /dev/stderr you can send one command output to terminal before executing wc so you can summarize at the bottom of the output.

reverse order of file

Getting a domain from url, ex: very nice to get url from squid access.log

Show sections of a man page.
Uses the formatting of a man page to show an outline of its headers and sub-headers.

Insert a line at the top of a text file without sed or awk or bash loops
Yet another way to add a line at the top a of text file with the help of the tac command (reverse cat).

cp the file
Copy the file with the given .extension at the source file's location. Eliminates the typing of long paths again and again.

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"

Go up multiple levels of directories quickly and easily.
Change to your taste. Much quicker than having to add 'cd' every time. Add it to your .bashrc or .bash_profile.


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: