Re: A silly question about tar
On Tue, Mar 20, 2007 at 12:45:51PM +0000, Tyler Smith wrote:
> On 2007-03-17, Tyler Smith <firstname.lastname@example.org> wrote:
> > On 2007-03-17, Douglas Allan Tutty <email@example.com> wrote:
> >> Within that directory I issued:
> >> $ls -1 | xargs -L 1 tar -xf
> >> and ended up with a test subdirectory containing all nine files.
> > The argument to ls, "ls -1" is not necessary.
> Did some reading on this, and it turns out that when standard output
> of ls is anything but a terminal it automatically defaults to
> 'ls -1'. So as soon as you put a pipe at the end of ls the -1 is
I just didn't want to assume anything. I wanted one line at a time, so
I specified it. Otherwise, an undocumented change to ls could cause a
problem that isn't apparent.