Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Sep 2002 20:13:22 -0700 (PDT)
From:      Peter Leftwich <Hostmaster@Video2Video.Com>
To:        FreeBSD Questions LIST <FreeBSD-Questions@FreeBSD.Org>
Subject:   using xargs to untar
Message-ID:  <20020922201022.R2138-100000@dhcp-407-32.san.rr.com>

next in thread | raw e-mail | index | archive | help
# ls -al *.tgz
-rw-r--r--  1 root  wheel  358995 Sep 22 18:25 z_flash-0.4.10.tgz
-rw-r--r--  1 root  wheel   27711 Sep 22 18:35 z_plugger-4.0.tgz
-rw-r--r--  1 root  wheel  309395 Sep 22 18:16 z_yelp-1.0.6.tgz

# find . -type f
./z_flash-0.4.10.tgz
./z_yelp-1.0.6.tgz
./z_plugger-4.0.tgz

# find . -type f | xargs -J G tar zxf G
tar: ./z_yelp-1.0.6.tgz not found in archive
tar: ./z_plugger-4.0.tgz not found in archive

What I am trying to do is the equivalent of the following:
# tar zxf file1.tgz ; tar zxf file2.tgz ; tar zxf file3.tgz

Is this possible with xargs?  I was using "G" as replstr (replace string).

Is there something better/smarter to use, now that I am enamoured of the
xargs command, which seems to transpose lists of things going down, to
lists of things going across (for example, pid's that are one per line
become one long line and can be killed via kill `xargs` or the like...?

(?)

--
Peter Leftwich
President & Founder
Video2Video Services
Box 13692, La Jolla, CA, 92039 USA
+1-413-403-9555


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020922201022.R2138-100000>