bug-coreutils
[Top][All Lists]
Advanced

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

Re: what will happen to the --reply option?


From: alessandro salvatori
Subject: Re: what will happen to the --reply option?
Date: Sat, 25 Aug 2007 21:57:36 -0700

what are the cases when a prompt would not have been shown? AFAIK, those
cases can be there only because of further options provided by the user, so
it's his fault...

my scripts just does:

    cp -d --preserve=mode,timestamps,links --reply=no

and i can't be sure everybody have rsync installed. I believe that
--reply=no is just so good and if people don't understand it, well, it's
their fault... after all i've seen plenty of experienced professionals who
still don't understand throughly the basics of file and directory
permissions in unix (yes, without ACL), and still permissions haven't been
declared deprecated.

Starting on 2008, all of the existing scripts that were relying on --reply
will be broken, and - which is worse - just when run on updated machine...
so it will become not immediately evident what's going wrong...

Thank you! and thanks for the tip on "yes n" instead of "yes | tr 'y'
'n'"!!!
-Alessandro

On 8/25/07, Eric Blake <address@hidden> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to alessandro salvatori on 8/25/2007 9:58 PM:
> > Hello,
> >
> >   some scripts I wrote time ago are now displaying a lot of lines like
> this
> > one:
> >
> > cp: the --reply option is deprecated; use -i or -f instead
> >
> > which is fairly annoying...
>
> We deprecated --reply because too many people did not understand how it
> would work - it does not prevent overwriting files, rather, it only
> answers no _if a prompt would have been issued_.  This issue has come up
> several times; you can search the mail archives for more details.
>
> >
> > On top of that the only way for me to get the desired behaviour of
> skipping
> > existing files seems to be:
> >
> > yes | tr 'y' 'n' | cp -iR source/ destination/ 2>/dev/null
>
> "yes | tr 'y' 'n'" is overkill, why not just use "yes n"?
>
> >
> > which would then conceal any kind of error message (again, annoying)...
>
> Why not use "rsync --ignore-existing" instead?
>
> - --
> Don't work too hard, make some time for fun as well!
>
> Eric Blake             address@hidden
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Cygwin)
> Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFG0P5o84KuGfSFAYARAhjEAJ4/A1l8P8mbSMWCwY+1eww/gMXs2wCeOif1
> MvN8HodzhSiBvAkt5u1MAhk=
> =z/lw
> -----END PGP SIGNATURE-----
>



-- 
Anche i masochisti confessano se torturati. Lo fanno per riconoscenza.
(Stanislaw J. Lec)

A l  e   s    s     a      n       d        r         o
         S        a       l      v     a    t   o  r i


reply via email to

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