09-23-2010
It can compare binary files, though it may not actually generate a diff if they differ; it may simply print the two filenames and the word "differ" to let you know, along with returing a non-zero exit status.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am comparing two files which are identical except for the timestamp which is incorporated within the otherwise same 372 bytes. I am using the command:
cmp -s $Todays_file $Yesterdays_file -i 372
When I run the command without the -i 372 it shows the difference i.e. the timestamp.... (5 Replies)
Discussion started by: gugs
5 Replies
2. Shell Programming and Scripting
Hello,
I try to compare 2 folders, i explain, i have file in this 2 folder and i want to print out the difference in this folders...
ex: folder1: file1 file2 file3
folder2: file1 file2
print file3
I do a ls of the 2 folders and i use the command diff (diff $var1 $var2) without... (8 Replies)
Discussion started by: protocomm
8 Replies
3. Shell Programming and Scripting
Hi All,
I have to compare set of files so I created a case statement with the option to give more than one file to compare. The Problem now i am facing is, if I compare the files directly, from prompt or just using the script only for a particular file then It's saying No difference, but If I... (4 Replies)
Discussion started by: Sudhar
4 Replies
4. Shell Programming and Scripting
Hi
I have 2 different folders on different machines. they are supposed to be same but some time for unknown reason they are not. then we have to generate a report for files which are not matching.
I was doing as below -
cd folder1
find . -type f | sort | cksum >1.txt
cd folder2
find .... (7 Replies)
Discussion started by: reldb
7 Replies
5. Shell Programming and Scripting
I do not know much about shell scripting so I am at a loss here. If someone can help me, that would be great!
I have two directories
/dir1
/dir2
I need to delete all files from /dir1 and that does not have a correspondent file in /dir2. It should NOT check file suffixes in /dir2 . Why?... (20 Replies)
Discussion started by: kaah
20 Replies
6. Shell Programming and Scripting
Hi, all:
I've got two folders, say, "folder1" and "folder2".
Under each, there are thousands of files.
It's quite obvious that there are some files missing in each. I just would like to find them. I believe this can be done by "diff" command.
However, if I change the above question a... (1 Reply)
Discussion started by: jiapei100
1 Replies
7. UNIX for Dummies Questions & Answers
Hello again,
A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x.
I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies
8. Shell Programming and Scripting
Hi,
I need help in shell scripting. If someone can help me, that would be great!
Problem. I want Linux Script to compare two folders and copy missing files.
Description.
I have two directories
/dir1
/dir2
I need to copy all distinct/new/unique/missing files from /dir1 and that... (1 Reply)
Discussion started by: S.Praveen Kumar
1 Replies
9. Shell Programming and Scripting
Hi,
So i know we use cp -r as a basic to copy folders/files.
I would like this BUT i would like to show the output of the files being copied.
With the amazing knowledge i have i have gone as far as this:
1) find source/* -exec cp -r {} target/ \;
2) for ObjectToBeCopied in `find... (6 Replies)
Discussion started by: Imre
6 Replies
10. Shell Programming and Scripting
Hello, my first thread here.
I've been searching and fiddling around for about a week and I cannot find a solution.:confused:
I have been converting all of my home videos to HEVC and sometimes the files end up smaller and sometimes they don't. I am currently comparing all the video files... (5 Replies)
Discussion started by: Josh52180
5 Replies
GZDIFF(1) General Commands Manual GZDIFF(1)
NAME
gzcmp, gzdiff - compare compressed files
SYNOPSIS
gzcmp [ cmp_options ] file1 [ file2 ]
gzdiff [ diff_options ] file1 [ file2 ]
DESCRIPTION
gzcmp and gzdiff are used to invoke the cmp or the diff program on compressed files. All options specified are passed directly to cmp or
diff. If only 1 file is specified, then the files compared are file1 and an uncompressed file1.gz. If two files are specified, then they
are uncompressed if necessary and fed to cmp or diff. The exit status from cmp or diff is preserved.
SEE ALSO
cmp(1), diff(1), gzmore(1), gzgrep(1), gznew(1), gzforce(1), gzip(1), gzexe(1)
BUGS
Messages from the cmp or diff programs refer to temporary filenames instead of those specified.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Availability | SUNWgzip |
+--------------------+-----------------+
|Interface Stability | External |
+--------------------+-----------------+
NOTES
Source for gzip is available in the SUNWgzipS package.
GZDIFF(1)