Re: find command problems

2023-06-01 Thread ogio.spam
Hello Il giorno lun, 29/05/2023 alle 00.02 +0100, Barry ha scritto: > > > > On 28 May 2023, at 16:18, ogio.spam wrote: > > > > find . -type f -iname "*pdf" -exec tar -Azvf > >  /var/tmp/SomeArchive.tgz {} \; > > find . -type f -iname "*pdf" -exec tar -Azvf >  /var/tmp/SomeArchive.tgz {} + >

Re: find command problems

2023-05-28 Thread Robert Nichols
On 5/28/23 09:12, francis.montag...@inria.fr 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:

Re: find command problems

2023-05-28 Thread Barry
> On 28 May 2023, at 16:18, ogio.spam wrote: > > find . -type f -iname "*pdf" -exec tar -Azvf /var/tmp/SomeArchive.tgz {} \; find . -type f -iname "*pdf" -exec tar -Azvf /var/tmp/SomeArchive.tgz {} + Using + means that as many filenames as can be passed are passed to tar. This reduces the n

Re: find command problems

2023-05-28 Thread Bill Cunningham
On 5/28/2023 11:17 AM, ogio.spam wrote: Il giorno dom, 28/05/2023 alle 08.49 -0400, Max Pyziur ha scritto: Greetings, When I issue a command such as: tar zcvf /var/tmp/SomeArchive.tgz `find . -iname '*pdf' -type f` This can also introduce some errors cause the command line can be too long to

Re: find command problems

2023-05-28 Thread ogio.spam
Il giorno dom, 28/05/2023 alle 08.49 -0400, Max Pyziur ha scritto: > > Greetings, > > When I issue a command such as: > tar zcvf /var/tmp/SomeArchive.tgz `find . -iname '*pdf' -type f` This can also introduce some errors cause the command line can be too long to be interpreted. If the find comman

Re: find command problems

2023-05-28 Thread Max Pyziur
On Sun, 28 May 2023, Tim via users wrote: On Sun, 2023-05-28 at 08:49 -0400, Max Pyziur wrote: `find . -iname '*pdf' -type f -perm 755` Searching for "spaces" through the man file for find, I find this: Safer `find -print0 | xargs -0` approach • Find files named core in or bel

Re: find command problems

2023-05-28 Thread Todd Zullinger
francis.montag...@inria.fr wrote: > Th following will do I think: > > find . -iname '*pdf' -type f -perm 755 -print0 \ > | xargs -0 chmod 644 Alternately, you can skip -print0 and xargs with: find . -iname '*pdf' -type f -perm 755 -exec chmod 644 {} + -- Todd signature.asc Descript

Re: find command problems

2023-05-28 Thread Tim via users
On Sun, 2023-05-28 at 08:49 -0400, Max Pyziur wrote: > `find . -iname '*pdf' -type f -perm 755` Searching for "spaces" through the man file for find, I find this: Safer `find -print0 | xargs -0` approach • Find files named core in or below the directory /tmp and delete

Re: find command problems

2023-05-28 Thread Francis . Montagnac
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

find command problems

2023-05-28 Thread Max Pyziur
Greetings, 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 fil