[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Empty Files using diff
From: |
Henrik Carlqvist |
Subject: |
Re: Empty Files using diff |
Date: |
Sun, 24 May 2009 22:37:36 +0200 |
User-agent: |
Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) |
James Kosin <jkosin@beta.intcomgrp.com> wrote:
> Example:
> --------
> perl-5.10.x/.... /.Zork.pm ( is an empty file that has been newly
> created with a size of 0-bytes)
> perl-5.10.0/.... does not contain the file or the new directory where
> the file is in perl-5.10.x
So you are comparing a non-existant file with an empty file in different
directory structures...
> If you do a 'diff -aNurp perl-5.10.0 perl-5.10.x', you don't get the
> newly created directory or file that has been created.
Thats exactly what the switch -N above is supposed to give, from the man
page:
-N
--new-file
In directory comparison, if a file is found in only
one directory, treat it as present but empty in the
other directory.
If you don't want that behavior, you might get a better result without the
-N switch.
regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc3(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost