bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cmp doesn't accept directories


From: Eric Blake
Subject: Re: cmp doesn't accept directories
Date: Fri, 26 May 2006 06:04:39 -0600
User-agent: Thunderbird 1.5.0.2 (Windows/20060308)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Dan Jacobson on 5/20/2006 12:36 AM:
> $ diff ntodo.txt /mnt/usb/cf/fromjidanni1/
> $ cmp ntodo.txt /mnt/usb/cf/fromjidanni1/
> cmp: /mnt/usb/cf/fromjidanni1/: Is a directory
> 
> Could make it like diff.

Actually, POSIX is probably buggy here, since it does not explicitly
exclude input files being directories.  It states that results are
undefined if the two input files are both stdin, the same FIFO, block, or
character special file; but does not have any restrictions about
directories.  But how is cmp supposed to tell you which byte differs on a
directory?  We probably need to raise a defect with the Austin group.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEdu7U84KuGfSFAYARAsKUAJ91YGUiawG93vuhq79J4tYjdYafbgCfXXl2
57tIGCvQCYGb8bjSduky/54=
=CyLO
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]