Commands by priya (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

Default value or argument
I used it for this function, which prints hashes: function liner { num_lines=${1:-42} echo printf %${num_lines}s|tr " " "#" echo } Note the colon-dash, instead of the usual colon-equals.

Show every subdirectory (zsh)

list all file-types (case-insensitive extensions) including subdirectories

find an unused unprivileged TCP port
Not really better - just different ;) There's probably a really simple solution out there somewhere...

List the size (in human readable form) of all sub folders from the current location
Sorted in human readable format.

Convert text to lowercase
Usage: lower [STRING]...

Colored status of running services
Replace service --status-all 2>&1 by service --status-all 2>/dev/null to hide all services with the status [ ? ]

is today the end of the month?

repeat a command every one second
Short method of "while x=0; do foo ; sleep 1 ; done"

Recursively search and replace old with new string, inside every instance of filename.ext
This is a slightly modified version of http://www.commandlinefu.com/commands/view/4283/recursive-search-and-replace-old-with-new-string-inside-files (which did not work due to incorrect syntax) with the added option to sed inside only files named filename.ext


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: