Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Aug 1996 11:58:14 -0400
From:      Mark Plummer <markus@clark.net>
To:        "Francisco Reyes" <reyes01@ibm.net>
Cc:        "FreeBSD questions" <questions@FreeBSD.ORG>
Subject:   Re: How to get tar to read input files from file? 
Message-ID:  <199608251558.LAA05100@clark.net>
In-Reply-To: Your message of "Sun, 25 Aug 1996 04:14:15 EDT." <199608250815.IAA30890@pop01.ny.us.ibm.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> I have a book which has a line like
> tar -cvf /dev/fd0 'cat backup.list'>backup.log
> 
> It is supposed to read the file names from a file called backup.list.
> When I try it it dowsn't work. I tried also using <backup.list and
> that didn't work either.
> 
> Any suggestions on how to pipe a file to tar to read input files?
> 

try this:
tar -cvf /dev/fd0 `cat backup.list`>backup.log

the forward quote (') is just a regular quote.  the backward quote (`) means
to substitute the output from the backquoted command at a given place in the
command line.  note that some systems (i don't know if freebsd is one) have
limitations on the size of the command line so exceedingly large backup.list
files could cause this to fail.

markus

-- Mark Plummer, markus@clark.net, +1 410 796 1272



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