All commands (14,187)

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

Get the /dev/disk/by-id fragment for a physical drive
Substitute for #11720 Can probably be even shorter and easier.

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Chronometer in hour format
Shorter and faster...

Show the last 20 sessions logged on the machine
change 20 by the number of sessions you want to know (20 it's fair enough)

Display / view the contents of the manifest within a Java jar file
Displays the manifest within a jar file. Can use it to confirm version number, etc.

Best kayak chiang
Just how to best outfit your fishing kayak can rely upon they type of fishing you're performing and the conditions you'll encounter. Little streams and seas need different concerns than offshore huge game fishing for instance. Whatever form of fishing you want to do, kayak fishing has some distinctive factors as the space is limited. It will be vital that you prioritize the most crucial things that you'll require to gain access to most regularly, and have them within simple reach. Some fishermen like to help keep it simple and hold the minimal level of gear: some like to hold something that they might probably need. There are several standard components that will raise the fish-ability of a kayak, or ensure it is more angler-friendly. Seats: Different than the usual exercise and your fishing equipment I'd claim that a high quality seat are at the the top of priority list. If you intend to spend your day fishing in comfort, you need to purchase a kayak with an excellent seat, or install one yourself. Pole Members: These are easy and useful areas to carry your rods securely while paddling, fishing or trolling. Some kayaks result from the factory with flush mounted rod slots or rod cases mounted on variable brackets. Some kayak retailers may modify your kayak by rigging pole cases for you really to match the wants of one's fishery: you may prefer to platform your own. There are numerous different models and types of rod holders from which to choose 1. Remove support rod holders are reduced in profile and give you a clear deck, so are not as likely becoming a range catcher (especially when travel fishing). There are plugs readily available for travel rods, and extensions for mainstream rods. Both could be removed when not in use. 2. Flexible pole members that are attached to the terrace are fully variable up and down, and provide 360-degree rotation. They come in types for spin/bait throwing or fly rods. Some may be removed when maybe not in use, which really is a great function if you are fly fishing. 3. There many other choices for mounting pole cases to seats, dairy crates and several other custom rigs. 4. Whatever the kind of pole holders you utilize, you ought to connect a pole lead therefore you may not lose them overboard. When you have to create a surf entry or exit, you must keep or secure your supports so they're maybe not lost in case of Best kayak chiang. Point Programs: These let you not just to stay in one spot where you would like to fish, but and also to fish a big area in an organized way. If you are sight fishing, blind throwing, or trolling you will need to cover the location as thoroughly that you can, and the correct anchor system will enable you to do so. You need to begin with an point basket as the base for the point system: a constant line working via a pulley on your own bow to a pulley on your stern with a snap land on each conclusion, and mounted on a band in the middle. You are able to fix your anchor line to or through the band, allowing you to modify your anchor point from any stage along the entire length of the kayak.

Add strikethrough to text

Every Nth line position # (SED)
sed extract every nth line. Generic is: $ sed -n 'STARTPOSITION,${p;n;*LINE}' foo where n;*LINE = how many lines. thus p;n;n; is "for every 3 lines" and p;n;n;n;n; is "for every 5 lines"

watch iptables counters
This will allow you to watch as matches occur in real-time. To filter out only ACCEPT, DROP, LOG..etc, then run the following command: watch 'iptables -nvL | grep -v "0 0" && grep "ACCEPT"' The -v is used to do an inverted filter. ie. NOT "0 0"

Get your bash scripts to handle options (-h, --help etc) and spit out auto-formatted help or man page when asked!!
This will make your bash scripts better!! process-getopt is a wrapper around getopt(1) for bash that lets you define command line options (eg -h, --help) and descriptions through a single function call. These definitions are then used in runtime processing of command line options as well as in generating help and man pages. It also saves a little time in coding and in producing nicely formatted documentation. It is quite similar to GNU's argp in glibc for compiled languages and OptionParse for python. See: Linux Gazette article 162: http://tldp.org/LDP/LGNET/162/hepple.html, http://sourceforge.net/projects/process-getopt, http://bhepple.freeshell.org/oddmuse/wiki.cgi/process-getopt


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: