Re: Piping find into tar...

2011-05-14 Thread Eitan Adler
generate list | while read X; do process $X; done often gets around many of the problems. But causes way more. I suggest you read http://www.dwheeler.com/essays/filenames-in-shell.html and http://www.dwheeler.com/essays/fixing-unix-linux-filenames.html -- Walter M. Pawley w...@wump.org

Re: Piping find into tar...

2011-05-09 Thread Walt Pawley
FWIW: Many have recommended using xargs to pass the generated list entries into tar or some other archiving program. I've often had trouble processing lists of filenames using xargs. Most of the problems revolve around oddball characters in the filenames, which tend to be created by users using

Piping find into tar...

2011-05-04 Thread Modulok
List, I've been playing with the find command lately. Is there a way I can pipe the putput list of files from find, into the tar command to create an archive which contains the files which find lists? I tried the following, but it didn't work (obviously). find -E . '.*\.txt$' -print | tar -cjf

Re: Piping find into tar...

2011-05-04 Thread Peter Vereshagin
Wake me up when September ends, freebsd-questions! 2011/05/04 01:25:39 -0600 Modulok modu...@gmail.com = To FreeBSD Questions : M find -E . '.*\.txt$' -print | tar -cjf result.tgz xargs(1) ? 73! Peter pgp: A0E26627 (4A42 6841 2871 5EA7 52AB 12F8 0CE1 4AAC A0E2 6627) -- http://vereshagin.org

Re: Piping find into tar...

2011-05-04 Thread David Demelier
On 04/05/2011 09:25, Modulok wrote: List, I've been playing with the find command lately. Is there a way I can pipe the putput list of files from find, into the tar command to create an archive which contains the files which find lists? I tried the following, but it didn't work (obviously).

Re: Piping find into tar...

2011-05-04 Thread b. f.
I've been playing with the find command lately. Is there a way I can pipe the putput list of files from find, into the tar command to create an archive which contains the files which find lists? I tried the following, but it didn't work (obviously). find -E . '.*\.txt$' -print | tar -cjf

Re: Piping find into tar...

2011-05-04 Thread Chris Rees
On 4 May 2011 08:44, b. f. bf1...@googlemail.com wrote: I've been playing with the find command lately. Is there a way I can pipe the putput list of files from find, into the tar command to create an archive which contains the files which find lists? I tried the following, but it didn't

Re: Piping find into tar...

2011-05-04 Thread b. f.
On 5/4/11, Chris Rees utis...@gmail.com wrote: On 4 May 2011 08:44, b. f. bf1...@googlemail.com wrote: I've been playing with the find command lately. Is there a way I can pipe the putput list of files from find, into the tar command to create an archive which contains the files which find

Re: Piping find into tar...

2011-05-04 Thread Modulok
By the way, in reference to the commands above the -j option is for bzip2, so the extension should be .tbz o_O Thanks everyone! I went with the following, because it works regardless of space characters in filenames. (Thanks for the correction on the extenion. It should indeed be 'tbz' when

Re: Piping find into tar...

2011-05-04 Thread b. f.
On 5/4/11, Modulok modu...@gmail.com wrote: As for pax, I thought tar could create pax archives too, via the --format pax option? Yes, although I haven't tested it thoroughly. pax(1) should also be able to create a number of different archive formats via the -x flag. I prefer tar(1)

Re: Piping find into tar...

2011-05-04 Thread Chris Rees
On 4 May 2011 10:42, Modulok modu...@gmail.com wrote: By the way, in reference to the commands above the -j option is for bzip2, so the extension should be .tbz o_O Thanks everyone! I went with the following, because it works regardless of space characters in filenames. (Thanks for the

Re: Piping find into tar...

2011-05-04 Thread kron24
Dne 4.5.2011 11:42, Modulok napsal(a): By the way, in reference to the commands above the -j option is for bzip2, so the extension should be .tbz o_O Thanks everyone! I went with the following, because it works regardless of space characters in filenames. (Thanks for the correction on the

Re: Piping find into tar...

2011-05-04 Thread b. f.
Dne 4.5.2011 11:42, Modulok napsal(a): By the way, in reference to the commands above the -j option is for bzip2, so the extension should be .tbz o_O Thanks everyone! I went with the following, because it works regardless of space characters in filenames. (Thanks for the correction on

Re: Piping find into tar...

2011-05-04 Thread Robert Bonomi
From owner-freebsd-questi...@freebsd.org Wed May 4 02:26:32 2011 Date: Wed, 4 May 2011 01:25:39 -0600 From: Modulok modu...@gmail.com To: FreeBSD Questions freebsd-questions@freebsd.org Subject: Piping find into tar... List, I've been playing with the find command lately. Is there a way

Re: Piping find into tar...

2011-05-04 Thread kron24
Dne 4.5.2011 14:37, b. f. napsal(a): Dne 4.5.2011 11:42, Modulok napsal(a): ... find -E . -regex '.*\.txt$' -print0 | xargs -0 tar -cjf result.tbz When the amount of files is huge then tar will be invoked twice or more. Thus result.tbz will contain just files from the last invocation. I

Re: Piping find into tar...

2011-05-04 Thread Lowell Gilbert
kron24 kro...@gmail.com writes: Dne 4.5.2011 11:42, Modulok napsal(a): By the way, in reference to the commands above the -j option is for bzip2, so the extension should be .tbz o_O Thanks everyone! I went with the following, because it works regardless of space characters in filenames.

Re: Piping find into tar...

2011-05-04 Thread Chris Rees
On 4 May 2011 14:25, Lowell Gilbert freebsd-questions-lo...@be-well.ilk.org wrote: kron24 kro...@gmail.com writes: Dne 4.5.2011 11:42, Modulok napsal(a): By the way, in reference to the commands above the -j option is for bzip2, so the extension should be .tbz o_O Thanks everyone! I