When using -remove-files together with -r and -C wrong files will be removed.

> tar --version
tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
> mkdir foo
> echo bar > bar
> echo foobar > foo/bar
> tar -cf foo.tar --remove-files -C foo bar
> find
.
./bar
./foo
./foo.tar
> echo foobar > foo/bar
> tar -rf foo.tar --remove-files -C foo bar
> find
.
./foo
./foo/bar
./foo.tar

Reply via email to