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

shell bash iterate number range with for loop

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

replace a character/word/string in a file using vim
Replace all ocurrences in the file. The g option is to replace more than one occurrence in the same line. Whitout the g option, it only replace the first occurrence in the line.

Check syntax for all PHP files in the current directory and all subdirectories

Stat each file in a directory
This will run stat on each file in the directory.

modify a file in place with perl
changes THIS to THAT in all files matching fileglob* without using secondary files

Escape forward slashes in a variable
For example $ path="/etc/apt/sources.list"; echo ${path//'/'/'\/'} will print $ \/etc\/apt\/sources.list

Join lines
Even shorter. Stolen from comment posted by eightmillion.

Search some text from all files inside a directory

display ip address
add this alias in .bashrc to fast check the ip address of your modem router alias myip="curl -s http://myip.dk | grep '' | sed -e 's/]*>//g'"


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: