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

Copy a file structure without files
Taken from: http://www.webmasterworld.com/forum40/1310.htm

Replace multiple spaces with semicolon

Print all fields in a file/output from field N to the end of the line

Look for English words in /dev/urandom
* to get the English dictionary: wget http://www.mavi1.org/web_security/wordlists/webster-dictionary.txt

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

find previously entered commands
Searches bash-history in reverse order (last entered commands first). Pressing ctrl+r again shows the next matching entry.

cpu and memory usage top 10 under Linux
It's like `prstat -t` under Solaris

multiline data block parse and CSV data extraction with perl
extract data in multiline blocks of data with perl pattern matching loop

Running scripts after a reboot for non-root users .
Sometimes we may want to run a script when a system reboots . We can simply do this by just scheduling the script using vixie cron with the @reboot option . e.g @reboot I use it to send me an alert message on our prod hosts to send an alert message when the system reboots . @reboot zaman uptime | echo `uptime` | mail -s "`uname -n` got rebooted" me@myhost.com

Find top 10 largest files in /var directory (subdirectories and hidden files included )
Same as above, but modified to show human readable output


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: