I would like to flatten and archive the following structure:
├── a
│ └── a.txt
├── ...
│ └── ...
└── z
└── z.txt
in this tar archive:
a.txt
...
z.txt
I could, for example,
- flatten the structure in some temporary location with
cp
and then archive - create the archive iteratively (tar option
--append
) and use--directory
each time - flatten the structure at extraction time with
--strip-components
Any other smart idea?