[Top][All Lists]

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

Re: GNU Tar on Windows XP

From: Bob Proulx
Subject: Re: GNU Tar on Windows XP
Date: Sat, 1 Mar 2008 20:23:01 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

Gadrin wrote:
> if I use
> J:\Temp Folders\wbtTemp>tar -c -f Test.tar | find Top ! -type f
> tar: Cowardly refusing to create an empty archive
> Try `tar --help' for more information.
> Top
> Top\Middle
> Top\Middle\Bottom
> tar gives up and won't create the archive. Am I doing something
> wrong ? Just not possible ?

Yes, you are doing something silly.  :-)  The -c option creates an
archive.  You are telling tar with 'tar -c -f Test.tar' to create a
tar archive Test.tar.  But you didn't give it any file arguments on
the command line.

And you are piping that into find which doesn't make sense to me
either.  The find comand will find files and take an action such as
outputing the name or other things but doesn't make sense receiving
whatever input was going to go into it there.

You probably wanted to do something like this:

  tar -c -f Test.tar `find Top -type d`

Except that requires a unix like command shell and your message showed
you using the MS and this won't work there.  It would work
in bash but not in  You might be able to use bash for the
command line like this.  I have not tried it.

  bash -c "tar -c -f Test.tar `find Top -type d`"


reply via email to

[Prev in Thread] Current Thread [Next in Thread]