Most Read

Most Read

Setting up Team Discussion Board

SharePoint 2007 has a Team Discussion Board that is used to initiate discussion and get replies on topics of interest. This article outlines the steps required to setup a discussion board, managing...
+ Full Article

More Popular Articles

Recent Articles

Recent Articles

Repeating Excel Header Rows

If your worksheet has several pages, it will be useful to have the header row repeat in all the pages. This will improve productivity as the user need not flip to the first page to view the header...
+ Full Article

More Recent Articles
Tar Command Usage PDF Print
User Rating: / 6
PoorBest 
Computing - Linux
An archive is a single file that has a collection of several other files. On Windows, the ZIP format is a commonly used archive format and on Unix and other Linux Operating System's, the tar (Tape ARchive) format is commonly used.

 

Creating a tar file

As an example, a listing from a directory is shown below:

[tsc@localhost ~]$ ls
Desktop index.html klipper_configure_actions.png practice wip
GnuPG index.html.1 klipper_configure_gen.png software
images klipper1.png klipper_configure_short.png tmp

Let us create a tar file named klipper.tar that holds all the .png files. The 'tar' command is shown below:

[tsc@localhost ~]$ tar -cvf klipper.tar klipper_configure_actions.png klipper_configure_gen.png klipper1.png klipper_configure_short.png

In the above cvf denotes the following:

c : create a new archive

v: verbosely list files processed

f: archive file

You can also use wildcards in the above example as follows:

tar -cvf klipper.png *.png

List files in the Archive

tar -tvf [file] produces a listing of the archived files verbosely.

[tsc@localhost ~]$ tar -tvf klipper.tar

Extract files from Archive

tar -xvf [file] extracts files from the archive verbosely. Output as follows:

[tsc@localhost ~]$ tar -xvf klipper.tar
klipper_configure_actions.png
klipper_configure_gen.png
klipper1.png
klipper_configure_short.png

External Reference


 

Trackback(0)
Comments (3)add
0
...
written by ni , March 12, 2009
Hi

Use the 'rm' function instead of delete function. It should be good. I just tried this on an UNIX box though not sure about Apple OS
report abuse
vote down
vote up
Votes: +0
0
...
written by Chris , March 11, 2009
I've seen plenty of examples of how to list archive contents and create archives, but what I can't find is a way of DELETING files from an archive. I know you have to use the --delete function, but any efforts I have tried have resulted in "Abort trap". If it helps I am trying to do this from the command line in Apple OSX 10.4 (Darwin)
report abuse
vote down
vote up
Votes: +0
0
...
written by Arif Hussain Jafri , February 20, 2008
Good Gyaan..
report abuse
vote down
vote up
Votes: +0
Write comment

security image
Write the displayed characters


busy
Last Updated on Wednesday, 14 November 2007 21:18
 

now browsing!

We have 40 guests online

Training

UPK Training

UPK Developer Training Course Description  Overview Understanding Developer menu and toolbar itemsSetting Developer PreferencesManaging FoldersManaging DocumentsCreating Views
+ Full Article

More on Training

Featured

Track Change Feature in PowerPoint

Track Changes is a feature that helps keep track of the revisions made to a document and is commonly used when a document passes through a review cycle. How to enable Track Change feature in...
+ Full Article

More Featured Articles

Sharepoint

Conditional Formatting using SP Designer

Sharepoint Designer facilitates applying formatting to lists based on some conditions. For example, applying colors to rows or fields or applying font style, color etc. This article outlines the...
+ Full Article

More on Sharepoint

Windows

Windows XP Password Reset Disk

What do you do if you do not remember the password in your Home PC. At work, you can request the Help Desk or Administrator to reset the password. For your Home PC you can create a Password Reset...
+ Full Article

More on Windows
 

Sedo - Buy and Sell Domain Names and Websites project info: referpages.com Statistics for project referpages.com etracker® web controlling instead of log file analysis