Tar command not taring all files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Tar command not taring all files
# 1  
Old 05-30-2013
Tar command not taring all files

I am just creating tar.gz file with comand tar -zcvf xyz.tar.gz /home/xyz/*

xyz folder contains thousands of files mostly .c, .cpp, etc..

I see that many times all the files are not zipped.
Many files(in hundreds) are abruptly left out.

What may be the reason for this and how to resolve this issue?
# 2  
Old 05-30-2013
Is there an error message (i.e. permission errors)?

If you have hidden files, you may want to use /home/xyz/. instead.
This User Gave Thanks to Scott For This Post:
# 3  
Old 05-30-2013
There are no hidden files scott.
It does not display any error but when I see using ls -l I see the huge difference in size.
The same command tars all files some times and some times it leave many of the files.
# 4  
Old 05-30-2013
The size would be different if you've compressed the files. Have you used tar tvf to test the tar file and verify its contents?
This User Gave Thanks to Scott For This Post:
# 5  
Old 05-30-2013
files are not compressed.
I checked using tvf and I saw many files missing.
# 6  
Old 05-30-2013
What OS are you on? Are any of those files that you claim tar is skipping, symbolic links and/or hard links? Is there a pattern to the files that tar is skipping?
This User Gave Thanks to fpmurphy For This Post:
# 7  
Old 05-30-2013
I am on SLES Linux.
there is no specific pattern and files are randomly omitted.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Backingup larger files with TAR command

I need to backup my database but the files are very large and the TAR command will not let me. I searched aids and found that I could do something with the mknod, COMPRESS and TAR command using them together. I appreciate your help. (10 Replies)
Discussion started by: frizcala
10 Replies

2. Solaris

Command to remove existing files in the tar files in Solaris 10

Hi, I am using solaris 10 OS.Please help me out with the commands needed in below two scenarios. 1)How to delete the existing files in the tar file. suppose i have a main tarfile named application.tar and it contains a file called ingres.tar. what is the command to remove ingres.tar... (2 Replies)
Discussion started by: muraliinfy04
2 Replies

3. UNIX for Dummies Questions & Answers

How to tar files of different extensions in one command

Linux RHEL 5.4 It is easy to create a tarball when you have files same extension For eg: You want to tar all files with the extension .log . This is easy tar -cvf diagnose.tar *.log I have two files with different extensions .log and .sh : error.log myscript.sh I want to create a... (5 Replies)
Discussion started by: John K
5 Replies

4. Shell Programming and Scripting

Single command - unzip files from a tar command

I have a tar file that contains multiple .Z files. Hence I need to issue a tar command followed by a gzip command to fully extract the files. How do I do it in a single command? What I'm doing now is tar xvf a.tar (this will output 1.Z and 2.Z) gzip -d *.Z (to extract 1.Z and 2.Z) (9 Replies)
Discussion started by: ericlim
9 Replies

5. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

6. Shell Programming and Scripting

TARing multiple files at once

Hi guys, I'm trying to write a quick script to archive off some data once a week. So far I have got; DATE=`date +%Y-%m-%d` TARFILE=${DATE}.tar for file in `find /usr/local/DATA/in -mtime +6`; do tar -czvf ${TARFILE} ${file}; done The problem I have is it is going through the results... (2 Replies)
Discussion started by: JayC89
2 Replies

7. Shell Programming and Scripting

Modifying command for Tar.gz Files.

:) Hi, I use the following command to search for a string in all the files in the directories and sub directories. find . -type f -print | xargs grep bermun@cial.net Can someone please cite a method wherin I can find the entries from a list of 300-500 *.gz files by modifying the above... (2 Replies)
Discussion started by: openspark
2 Replies

8. UNIX for Dummies Questions & Answers

How to move files while Taring..

Hi, When I run the following command the files get TAR but the files in the folder remain intact. tar -cvf TARZIP.10 Nov09/ Is there any way to move them into the folder than just copying them. Thanks and regards, Gideon. (2 Replies)
Discussion started by: preethgideon
2 Replies

9. Solaris

TAR command , listing backed up files

I've backed up several files to tape using tar, and wish to list those that have backed up. % tar cvf /dev/rmt/2un /s_1/oradata/pgpub/config.ora a /s_1/oradata/pgpub/config.ora 2 tape blocks But when I go to list the files: % tar tvf /dev/rmt/2un tar: tape read error What am I... (3 Replies)
Discussion started by: FredSmith
3 Replies

10. UNIX for Dummies Questions & Answers

using tar command to copy files?

hi, can i use the tar command to copy an entire directory and its content in another folder? What is the proper syntax? thx (2 Replies)
Discussion started by: tomapam
2 Replies
Login or Register to Ask a Question