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

Change the extension of a filename by using rename to convert
This will change all files ending in .JPG to .jpg and will work with any file extension

IFS - use entire lines in your for cycles
When you use a "for" construct, it cycles on every word. If you want to cycle on a line-by-line basis (and, well, you can't use xargs -n1 :D), you can set the IFS variable to .

Show biggest files/directories, biggest first with 'k,m,g' eyecandy
I use this on debian testing, works like the other sorted du variants, but i like small numbers and suffixes :)

Print just line 4 from a textfile
this method should be the fastest

Remove a line from a file using sed (useful for updating known SSH server keys when they change)
For example, to remove line 5 from foo, type: vi +5d +wq foo

Jump up to any directory above the current one
Usage: upto directory

Display any tcp connections to apache
Sometimes apache will get stuck in an established state where you can't get a list of the connecting IP's from mod_status... not a good thing when you need to ban an abusive ip.

force a rescan on a host of scsi devices (useful for adding partitions to vmware on the fly)

To find the count of each open file on a system (that supports losf)

Listing today’s files only


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: