bug-coreutils
[Top][All Lists]
Advanced

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

Re: 'cp: .snapshot/xxx and xxx are identical'


From: Andreas Schwab
Subject: Re: 'cp: .snapshot/xxx and xxx are identical'
Date: Mon, 07 Mar 2005 13:36:20 +0100
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/22.0.50 (gnu/linux)

Tim Waugh <address@hidden> writes:

> A Netapp NFS server containing a file (xxx) and a snapshot of the file
> (.snapshot/xxx) will give them the same inode number.
>
> Unfortunately, 'cp .snapshot/xxx xxx' (in order to recover the
> snapshot version) fails with '... are identical' due to the inode
> check.
>
> Is there some way of bypassing this check?
>
> More importantly, is there something in POSIX which says that this
> check is allowed in the first place?

<http://www.opengroup.org/onlinepubs/009695399/utilities/cp.html>

    If source_file references the same file as dest_file, cp may write a
    diagnostic message to standard error; it shall do nothing more with
    source_file and shall go on to any remaining files.

(Not sure whether that allows exiting with non-zero status.)

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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