On 5/28/23 09:12, Francis.Montagnac@xxxxxxxx wrote:
Hi
On Sun, 28 May 2023 08:49:22 -0400 Max Pyziur wrote:
When I issue a command such as:
tar zcvf /var/tmp/SomeArchive.tgz `find . -iname '*pdf' -type f`
and it encounters a filename such as ./My Documents/SomeFile.pdf
The results are:
tar: ./My: Cannot stat: No such file or directory
tar: Documents/SomeFile.pdf: Cannot stat: No such file or directory
Use for example:
find . -iname '*pdf' -type f \
| tar zcvf /var/tmp/SomeArchive.tgz --files-from=- --verbatim-files-from
This assumes that no filename contains a linefeed.
find . -iname '*pdf' -type f -print0 \
| tar zcvf /var/tmp/SomeArchive.tgz --null --files-from=-
The "--null" option tells tar to use the ASCII NUL character as a
separator and assumes "verbatim".
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue