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

Set Time Zone in Ubuntu
Reconfigures time zone in Ubuntu, which I cannot figure out how to do through the GUI. Worked like a charm to set my time zone to CEST from EDT.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

Parse YouTube url (get youtube video id)
url can be like any one of followings: $url="MejbOFk7H6c" $url="http://youtu.be/MejbOFk7H6c" $url="https://youtube.com/watch?feature=player_embedded&v=MejbOFk7H6c#t" $url="//www.youtube.com/v/MejbOFk7H6c?hl=ru_RU&version=3&rel=0" $url="http://www.youtube.com/embed/MejbOFk7H6c?feature=player_embedded" If url mismatching, whole url will be returned.

File rotation without rename command
Rotates log files with "gz"-extension in a directory for 7 days and enumerates the number in file name. i.e.: logfile.1.gz > logfile.2.gz I needed this line due to the limitations on AIX Unix systems which do not ship with the rename command.

remove all spaces from all files in current folder

Connect to all running screen instances
There was another line that was dependent on having un-named screen sessions. This just wouldn't do. This one works no matter what the name is. A possible improvement would be removing the perl dependence, but that doesn't effect me.

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"

Webcam view with vlc
Quick command to test your webcam. Press 'f' to toggle fullscreen. Can also use 'vlc v4l2://' if you want gui controls. For higher/smoother framerate lower the default resolution: $ cvlc v4l2:// :v4l2-width=320 :v4l2-height=240 &

Ad blocking on Ubuntu phone/tablet with hosts file
Will append lines to the hosts file to do some basic ad blocking.

Rename .JPG to .jpg recursively
This command is useful for renaming a clipart, pic gallery or your photo collection. It will only change the big caps to small ones (on the extension).


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: