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

make 100 directories with leading zero, 001...100, using bash3.X

Commit only newly added files to subversion repository

FInd the 10 biggest files taking up disk space

Remove specific versions of old kernels (Ubuntu/Debian)
If, for example, you want to remove all kernels and headers but the last three versions, you can't use one of that magic all-in-one "remove old stuff" commands. With this simple but elegant command you can remove a range of versions, or a list of versions with e.g. {14,16,20}.

print contents of file from first match of regex to end of file
Search in "filename" for the first line to match regex, and print to stdout from the matching line to the end of the file.

no more line wrapping in your terminal
works on all unices.

Insert the last argument of the previous command
for example if you did a: $ ls -la /bin/ls then $ ls !$ is equivalent to doing a $ ls /bin/ls

Google text-to-speech in mp3 format
same but redirecting to player and putting whaever text line.. works on my ubuntu machine ...

Delete all but the latest 5 files, ignoring directories

Copy one file to multiple files
Copies file.org to file.copy1 ... file.copyn


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: