On 01Feb2023 20:24, Patrick Dupre <pdu...@gmx.com> wrote:
To create a tar file, I used to create a list and to make
tar -cvzf arch.tgz $list
However, if there are file names with a space, this space is
interpreted as file name separator.
If you can match the files with a glob (shell pattern):
tar cvzf arch.tgz *.ext
Obviously replacing *.ext appropriately. And of course you can give that
many times.
If the files are the entire content of a directory, merely mentioning
the directory is enough:
tar cvzf arch.tgz directoryname
Of course you can give multiple directories or globs.
And in modern shells there's a "**" pattern means a recursive walk. So:
tar cvzf arch.tgz subdir/**/*.py
to name all the .py files in subdir. And so forth.
All of these are space (and other weird characters) safe.
If you must make the tar file in a few goes/batches, do the first with
"c" (create) and the rest with "r" (replace), which does an append.
Cheers,
Cameron Simpson <c...@cskk.id.au>
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue