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

Create a backup of file being edited while using vi
At the start of a vi session and *before* saving any changes use ":!cp % %-" to make a backup of the current file being edited. example: vi /data/some/long/path/file :!cp% %- creates /data/some/long/path/file-

Find the package that installed a command

Realtime lines per second in a log file
Using tail to follow and standard perl to count and print the lps when lines are written to the logfile.

Download all files from podcast RSS feed
Neither of the others worked for me. This does.

Find default gateway (proper at ppp connections too)

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

See non printable caracters like tabulations, CRLF, LF line terminators ( colored )
For fancier and cleaner output, try the following snippet : $ showendlines(){ while read i; do od --address-radix=n --width=$(wc -c

Superfast portscanner

Diff files over SSH
Sometimes you need to compare two config files on different servers. Put the file names into the above script and let 'er rip.

Copy an element from the previous command
'n' is a non-negative integer. Using 0 will expand to the name of the previous command.


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: