You are not logged in.
I'm trying to combine the --no-recursion and --recursion tar options like it says here: http://www.gnu.org/software/tar/manual/ … curse.html
The --no-recursion and --recursion options apply to later options and operands, and can be overridden by later occurrences of --no-recursion and --recursion. For example:
$ tar -cf jams.tar --no-recursion grape --recursion grape/concord
creates an archive with one entry for grape, and the recursive contents of grape/concord, but no entries under grape other than grape/concord.
...but it doesn't seem to work. If I try the example, the contents of grape are archived, and the contents of grape/concord are archived twice. Is this a bug or am I missing something?
Offline
$ tar -cf jams.tar grape/concord/*
Offline
Thanks, but that doesn't store the 'grape' and 'grape/concord' directories individually, so their owner/group/permissions are not stored, which is what I want.
But I figured out a way that works: tar -cf jams.tar --no-recursion grape ; tar -rf jams.tar grape/concord
I can't see why the manual example doesn't work though.
Offline
Does it work as you want if you specify the recursion before the no-recursion option?
Offline
with: tar -cf jams.tar --recursion grape/concord --no-recursion grape
only the 'grape' and 'grape/concord' directories are stored, nothing else.
Offline