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

Read almost everything (Changelog.gz, .tgz, .deb, .png, .pdf, etc, etc....)
It allows customizing by means of lesspipe. You need to write a ~/.lessfilter script and put this into your ~/.bashrc: eval $(lesspipe) export LESS=-r

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

Query wikipedia over DNS

change exif data in all jpeg's
this takes every jpg in the current directory and changes the exif data for manufactur and model. in my case i change it to LOMO LC-A because my scanner puts his data in there :]

List every file that has ever existed in a git repository
What was the name of that module we wrote and deleted about 3 months ago? windowing-something? $ git log --all --pretty=format:" " --name-only | sort -u | grep -i window

Extract a bash function
I often need to extract a function from a bash script and this command will do it.

watch iptables counters
Watch the number of packets/bytes coming through the firewall. Useful in setting up new iptables rules or chains. Use this output to reorder rules for efficiency.

Download Video & extract only a specific Time of it
Because this does not download more of the video than necessary, it is faster (especially with long videos).

See entire packet payload using tcpdump.
This command will show you the entire payload of a packet. The final "s" increases the snaplength, grabbing the whole packet.

Don't save commands in bash history (only for current session)
Unsetting HISTFILE avoid getting current session history list saved.


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: