Commands using cat (514)

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

Instant mirror from your laptop + webcam
Flips the y-axis to emulate a real mirror, uses low resolution for speed, this will also hide blemishes and the like :)

shell bash iterate number range with for loop

Top 10 Memory Consuming Processes

pip install into current directory without virtualenv
For subsequent commands in the prefixed path: $ PYTHONPATH=$PWD/lib/python*/site-packages ./bin/pip --version

Rename files in batch

Getting a domain from url, ex: very nice to get url from squid access.log

Replace duplicate files by hardlinks

Simplification of "sed 'your sed stuff here' file > file2 && mv file2 file"

Recursively chmod all dirs to 755 and all files to 644

Writes ID3 tags using the file name as the title.
Assumes that the files are named as such: 01-Filename.mp3 If your files are named differently, change the number of periods in the sed 's/...\(.*\)/\1' bit to match the numbers of characters you need to cut off the front of the file. Note: This only writes the titles.


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: