Commands by cobrajs272 (1)

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

My PS1
My PS1

Convert one file from ISO-8859-1 to UTF-8.
Nothing fancy it just converts one file from one character encoding into another one.

Remount root in read-write mode.
Saved my day, when my harddrive got stuck in read-only mode.

Ping all hosts on 192.168.1.0/24

monitor a tail -f command with multiple processes
when using named pipes only one reader is given the output by default. Also, most commands piped to by grep use a buffer which save output until tail -f finishes, which is not convenient. Here, using a combination of tee, sub-processes and the --line-buffered switch in grep we can workaround the problem.

make a log of a terminal session
Creates a log of a session in a file called typescript. Or specify the file with: $script filename Exit the session with control-d.

convert unixtime to human-readable

mail with attachment
An easy one but nice to keep in mind.

dump 1KB of data from ram to file

Do one ping to a URL, I use this in a MRTG gauge graph to monitor connectivity


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: