Tar command to compare


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Tar command to compare
# 1  
Old 02-27-2013
Tar command to compare

Hi,

I need to compare two directories and I'm using the command tar -dvf directory.tar in the directory on other machine.

I saw in the result, message like Uid, Gid, Mod time differs, etc... and it is understandable
Code:
etc/group: Uid differs
etc/group: Gid differs
etc/rc2.d/K01nrpe: Mod time differs
etc/svc/volatile/system-hotplug\:default.log: Contents differ
[...]

BUT what's means when nothing message appear? I means when only file appears whitout message? here are an example :
Code:
/etc/sysdef
/etc/rc3
/etc/swap
/etc/inittab
etc/inittab: Uid differs
etc/inittab: Gid differs
etc/inittab: Mod time differs
etc/inittab: Size differs
[...]
/etc/fs/
/etc/fs/nfs/
[...]
/etc/umountall
/etc/minor_perm

What means this? Files are OK on both side? or these files are not present on one side?

Thanks for your help!
# 2  
Old 02-27-2013
Hi.

The page GNU tar 1.26 contains a brief example of GNU tar using "-d".

Best wishes ... cheers, drl
# 3  
Old 02-27-2013
Hi,

Thank you for the links... it's helpful

Best regards
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compare 2 files tar.lzo with/without extracting

Hi Guys, I have 2 compressed files tar.lzo and having many subdirectories inside it. I would like to know which files having the difference in terms of size/content. I am using bash shell and unix server example:- file1 :- abc.tar.lzo file2 :- xyz.tar.lzo Result:- ... (4 Replies)
Discussion started by: himanshupant
4 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

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

4. 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

5. Shell Programming and Scripting

Require compare command to compare 4 files

I have four files, I need to compare these files together. As such i know "sdiff and comm" commands but these commands compare 2 files together. If I use sdiff command then i have to compare each file with other which will increase the codes. Please suggest if you know some commands whcih can... (6 Replies)
Discussion started by: nehashine
6 Replies

6. Shell Programming and Scripting

tar command dont tar to original directory

HI, if I have a tarfile called pmapdata.tar that contains tar -tvf pmapdata.tar -rw-r--r-- 0/0 21 Oct 15 11:00 2009 /var/tmp/pmapdata/pmap4628.txt -rw-r--r-- 0/0 21 Oct 14 20:00 2009 /var/tmp/pmapdata/pmap23752.txt -rw-r--r-- 0/0 1625 Oct 13 20:00 2009... (1 Reply)
Discussion started by: borderblaster
1 Replies

7. 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

8. UNIX for Dummies Questions & Answers

tar command.

I have a big file, I would like to use command tar Can I compress it 2 files with command tar ? I have data : file1.Z my target : archive files, file1.tar and file2.tar many thanks. (5 Replies)
Discussion started by: photo
5 Replies

9. Shell Programming and Scripting

compare two tar.bz2

Hello, I am using a bash script to archive directories of text files located in ${root}: tar cf ${root}.tar ${root}* bzip2 ${root}.tar I'd like to compare the newly produced archive two.tar.bz2 with the second latest one.tar.bz2. cmp one.tar.bz2 two.tar.bz2 returns one.tar.bz2 two.tar.bz2... (2 Replies)
Discussion started by: JCR
2 Replies

10. UNIX for Dummies Questions & Answers

Tar Command

I'm new to Unix, :confused: What is a TAR Command? What does it do? I need simple explanation. (4 Replies)
Discussion started by: technie07
4 Replies
Login or Register to Ask a Question