Commands using cat (502)

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

Insert a line for each n lines

Cut the first 'N' characters of a line
You can also cut charactes starting from X to N.

list block devices
Shows all block devices in a tree with descruptions of what they are.

eth-tool summary of eth# devices
Give the Speed and Link status of eth# 0-3. This is sort of what mii-tool does, but eth-tool is better, yet lacks device discovery.

Changes standard mysql client output to 'less'.
Changes standard mysql client output to 'less'. In another words makes query results of mysql command line client to look much better.

read a file line by line and perform some operation on each line
see sample output

Find usb device
I often use it to find recently added ou removed device, or using find in /dev, or anything similar. Just run the command, plug the device, and wait to see him and only him

What is my public IP address
It's easier then the listed command, I'm thinking. but doesn't matter much--its closer to personal preference really.

Extract shortcuts and hostnames from .ssh/config
Spits out table that shows your Host->HostName aliases in ~/.ssh/config

Execute a command before display the bash prompt
For example, if you are the type who type ls very often, then $ PROMPT_COMMAND=ls will ls after every command you issue.


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: