Commands using tar (226)

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

Sync the date of one server to that of another.
(Useful when firewalls prevent you from using NTP.)

swap the java version being used
You have openjdk and sun java installed. Many of your java plugins will not work properly. Something called IcedTea (the java web plugin) keeps crashing. Run this and select sun java to use sun java.

Find top 10 largest files in /var directory (subdirectories and hidden files included )
Same as above, but modified to show human readable output

SAR - List the average memory usage for all days recorded under '/var/log/sa/*' using sar -r.

Selecting a random file/folder of a folder
Also looks in subfolders

Check if variable is a number

Pronounce an English word using Merriam-Webster.com
Looks up a word on merriam-webster.com, does a screen scrape for the FIRST audio pronunciation and plays it. USAGE: Put this one-liner into a shell script (e.g., ~/bin/pronounce) and run it from the command line giving it the word to say: $ pronounce lek If the word isn't found in merriam-webster, no audio is played and the script returns an error value. However, M-W is a fairly complete dictionary (better than howjsay.com which won't let you hear how to pronounce naughty words). ASSUMPTIONS: GNU's sed (which supports -r for extended regular expressions) and Linux's aplay. Aplay can be replaced by any program that can play .WAV files from stdin. KNOWN BUGS: only the FIRST pronunciation is played, which is problematic if you wanted a particular form (plural, adjectival, etc) of the word. For example, if you run this: $ pronounce onomatopoetic you'll hear a voice saying "onomatopoeia". Playing the correct form of the word is possible, but doing so might make the screen scraper even more fragile than it already is. (The slightest change to the format of m-w.com could break it).

Remove audio stream from a media file
This syntax also works for ffmpeg as avconv is a fork of ffmpeg.

Install pip with Proxy
Installs pip packages defining a proxy

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"


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: