Tar file issue.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Tar file issue.
# 1  
Old 01-27-2009
Tar file issue.

Hi all,

I have couple of files I need to tar and put in some client server could some body help me the basic understanding of tarring files please It would be a great help.

regards
Anwar
# 2  
Old 01-27-2009
Here's a simple example:

# tar cvf [tar_filename_to_create] [files_to_backup]

i.e.

# tar cvf /tmp/filearchive.tar /usr/data/file1 /usr/data/file1
# 3  
Old 01-27-2009
Quote:
Originally Posted by Haque123
could some body help me the basic understanding of tarring files please It would be a great help.
man tar # shows you the syntax for the tar utility

tar -cvf test.tar /etc # tars all files of the dir /etc
tar -vtf test.tar # shows which files are in your tar archive
tar -xvf test.tar # extracts all the files in the current directory

That should give you a fast start.

brgds from user sdohn
# 4  
Old 01-27-2009
Hi nck and sdohn,
Thanks alot for replies really helped me alot.

And for un-tarring the the files which commands do I use.

Really new to unix never mind....!

Regards
Ann
# 5  
Old 01-28-2009
You can use tar -xvf filename.tar
Ashok_oct22
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue with tar command

Hi all, I have a folder that I am trying to tar ut is leading to unexpected results. Ive written a script that find a certain number of files(logs) with specific names older than 14 days, moves them to a folder and compresses that folder. _ARCHIVE=/opt/test/archived_logs... (2 Replies)
Discussion started by: Junaid Subhani
2 Replies

2. UNIX for Dummies Questions & Answers

UNIX command to check if file name ends with .tar OR if the file is a tar file

Hello Team, Would you please help me with a UNIX command that would check if file is a tar file. if we dont have that , can you help me with UNIX command that would check if file ends with .tar Thanks in advance. (10 Replies)
Discussion started by: sanjaydubey2006
10 Replies

3. Shell Programming and Scripting

Tar and un-tar issue

In AIX 5.3, I have these directories: /lms /lms/w_standard /lms/d_admin /lms/b_common /lms/b_prodbus /lms/d_prod /lms/d_prod/ccldir /lms/d_prod/ccluserdir /lms/d_prod/config /lms/d_prod/data /lms/d_prod/log /lms/d_prod/ocd /lms/d_prod/print /lms/d_prod/temp /lms/reg... (7 Replies)
Discussion started by: Daniel Gate
7 Replies

4. UNIX for Dummies Questions & Answers

Do I need to extract the entire tar file to confirm the tar folder is fine?

I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it. Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem? tar tvf file1.tar ... (1 Reply)
Discussion started by: vivien_chu
1 Replies

5. UNIX for Advanced & Expert Users

Issue in extracting Tar and Zipped file.

Hi, I want to tar files and zip them in order to clean up space in directory. I have files like /path/file1 /path file2. What I am trying to do is: Option 1: tar -cvf /path/file1 /path file2 | gzip > test.tar.gz I got the file created. But while trying to extract the Tar and zipped file, I... (1 Reply)
Discussion started by: Quesemail
1 Replies

6. Shell Programming and Scripting

scp/untar .tar file in parallel issue

Hi Guys, I am facing a strange issue while doing parallel (using & for background) scp/untar operation from my unix box to multiple unix boxes... I am getting tar : unexpected EOF in archive error the code is as follows.,,, for i in 10 do sh -c "scp <command> ; ssh tar -xf <tar> -C... (4 Replies)
Discussion started by: mihirvora16
4 Replies

7. UNIX for Dummies Questions & Answers

TAR issue

Hello all, I was attempting to create a tar file via this command: tar cpf 20100529.tar | find . -name *20100529* Attempt to create archive of no files. Nothing dumped. which produced a list of several files in the .tar file but in the end the file was: -rw-r--r-- 1 xxx_xxxx users ... (9 Replies)
Discussion started by: riker
9 Replies

8. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

9. Shell Programming and Scripting

tar issue

frnds, I compressed some files on the basic of $date var. $date contains todays date in some specific format.. also my files are in different directories... now, I m doing. tar -cvf archive.tar /root/abc/*$date* /root/wxv/123/*$date* /var/*$date* this creates archive.tar for me.. ... (4 Replies)
Discussion started by: clx
4 Replies

10. Shell Programming and Scripting

extract one file form .tar.gz without uncompressing .tar.gz file

hi all, kindly help me how to extract one file form .tar.gz without uncompressing .tar.gz file. thanks in advance bali (2 Replies)
Discussion started by: balireddy_77
2 Replies
Login or Register to Ask a Question