[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A silly question about tar



On 2007-03-17, Douglas Allan Tutty <dtutty@porchlight.ca> wrote:
>
> Within that directory I issued:
>
> 	$ls -1 | xargs -L 1 tar -xf
>
> and ended up with a test subdirectory containing all nine files.
>

Ok, I tried that out. The key seems to be the arguments to xarg,
either "-L 1" as you suggest, or "-n 1" as suggested by another
poster. The argument to ls, "ls -1" is not necessary. I tried your
example with ls *.tar.gz | and ls -1 *.tar.gz |, and both worked when
piped into xargs -L 1 or xargs -n 1, but not plain xargs.

Thanks!

-- 
Regards,

Tyler Smit



Reply to: