Re: cp: backup version control
On Sat, Jun 19, 2010 at 8:36 AM, T o n g <mlist4suntong@yahoo.com> wrote:
> Hi,
>
> >From 'man cp':
>
> ,-----
> | The backup suffix is `~', unless set with --suffix or SIM-
> | PLE_BACKUP_SUFFIX. The version control method may be
> | selected via the --backup option or through the
> | VERSION_CONTROL environment variable.
> `-----
>
> However, I found that the VERSION_CONTROL environment variable doesn't
> work:
>
> $ cp -v --suffix=b --backup=numbered a b
> `a' -> `b' (backup: `b.~3~')
>
> $ export VERSION_CONTROL=numbered
> $ cp -v a b
> `a' -> `b'
$VERSION_CONTROL works when -b/--backup is given
> Moreover, the SIMPLE_BACKUP_SUFFIX or --suffix does not work at all.
>
> Any comment?
here's a set of examples
=-=-=
$ touch a b c d e f; ls
a b c d e f
$ cp -b a b
$ cp -b --suffix=.bak a c
$ SIMPLE_BACKUP_SUFFIX=.b cp -b a d
$ cp --backup=t a e
$ VERSION_CONTROL=numbered cp -b a f
$ ls
a b b~ c c.bak d d.b e e.~1~ f f.~1~
=-=-=
> Thanks
>
> --
> Tong (remove underscore(s) to reply)
> http://xpt.sourceforge.net/techdocs/
> http://xpt.sourceforge.net/tools/
Tao
--
http://huangtao.me/
http://www.google.com/profiles/UniIsland
Reply to: