The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sed very confused minifish Shell Programming and Scripting 14 04-14-2008 01:08 PM
confused sauravjung UNIX for Dummies Questions & Answers 1 04-07-2008 11:08 AM
confused with cp C|[anti-trust] Shell Programming and Scripting 12 05-26-2005 01:55 AM
confused hapiworm UNIX for Dummies Questions & Answers 4 06-17-2002 03:30 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-17-2004
frustrated1 frustrated1 is offline
Registered User
  
 

Join Date: Aug 2003
Location: Ireland
Posts: 278
confused about tar

I have some questions about tar - I am confused...

What exactly does tar do?

I used tar cvf tarfile file1 and I get the following
-rw-r--r-- 1 root other 12587520 Jun 17 10:59 file1
-rw-r--r-- 1 root other 12587520 Jun 17 11:04 tarfile

Both files appear same in size etc...
I see tar used to write files to tape but you can just write a file to tape directly if thats the case. What is the advantage of tar?


Maybe a stupid question with a simple answer but I would appreciate comments...
  #2 (permalink)  
Old 06-17-2004
dkaplowitz dkaplowitz is offline
Registered User
  
 

Join Date: Jun 2004
Location: ~Philadelphia
Posts: 63
Try

Code:
tar -cvf filename.tar filenameordirectoryyouaretarring

Then do a

Code:
tar -tvf filename.tar

to view its contents


Code:
tar -xvf filename.tar

to extract it.
  #3 (permalink)  
Old 06-17-2004
pressy's Avatar
pressy pressy is offline Forum Staff  
solaris cultist
  
 

Join Date: Aug 2003
Location: Vienna / Austria (Europe) [EARTH]
Posts: 726
the advantage of tar is to include many files and subdirectories in one file. if you are using the orig tar from solaris the tar will not compress the files like gnu tar or zip.....

g P
  #4 (permalink)  
Old 06-18-2004
woofie woofie is offline
Registered User
  
 

Join Date: Jan 2004
Location: Australia
Posts: 195
Also an advantage of using tar is all *NIX systems have tar. So moving files between them is easy to do as one tar file instead of heaps of smaller files.

Tar is used for compressing files, grouping together files, can be sued for backups etc.

If you tar something up and what to untar it in a Windws system then use winrar.
  #5 (permalink)  
Old 06-21-2004
encrypted's Avatar
encrypted encrypted is offline Forum Advisor  
Registered User
  
 

Join Date: Feb 2004
Location: Oslo, Norway
Posts: 219
man tar .............:-)
  #6 (permalink)  
Old 06-24-2004
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
If it's compression you're after, then gzip the resulting tar file.

If you're using GNU tar, the z option will do this for you at the same time as file creation.

You can untar a gzipped tar file easily with
zcat my_file.tar.gz | tar xvf -

or with GNU tar, in one fell swoop
tar xvzf my_file.tar.gz

As the poster above said, man tar.

I'll also say, man gzip.

Cheers
ZB
Closed Thread

Bookmarks

Tags
solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:39 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0