coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH]: add an option for quiet copy operations


From: Pádraig Brady
Subject: Re: [PATCH]: add an option for quiet copy operations
Date: Thu, 16 Feb 2012 14:01:36 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 02/16/2012 07:21 AM, Guido Trentalancia wrote:
> Hello.
> 
> I am writing to propose a simple patch for review. The patch adds an
> option "-q" or "--quiet" to cp, mv and install so that they can support
> quiet operation on missing SOURCE files.
> 
> Such behavior might be useful for example when using any of the above
> commands from scripts.
> 
> The patch can be applied both to the git tree and to the latest release.
> 
> Add an option "-q, --quiet" for cp, mv and install so that the program
> does not complain about any missing SOURCE file.
> 
> Signed-off-by: Guido Trentalancia <address@hidden>

Thanks a lot for taking time to do the patch.
I'm not sure about it though.
You could easily use other tools to filter non existent arguments.
Something like:

  find file1 file2 -print0 2>/dev/null |
  xargs -r0 cp --target=dest/

Or alternatively something like:

  cp $(realpath -e file1 file2 2>/dev/null) dest/

cheers,
Pádraig.

p.s. Hmm, I wonder should `realpath -e` suppress ENOENT.
readlink -e does



reply via email to

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