[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: |
Sun, 2 Mar 2008 14:22:35 -0700 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Gadrin wrote:
> I was going off of
> http://forums12.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1204469251779+28353475&threadId=1178036
>
> The difference being the "." (dot) to match everything. However in
> gnu tar, I'm able to use a single directory when I type in the
> command line as I mentioned
In a regular expressoin "." matches any character but in the thread
you reference "." is used in a file context not a regular expression
context. In a file context "." indicates the current directory. In
Unix filesystems every directory has two special entries. "." is the
current directory and links to itself. ".." is the parent directory
and links upward.
So in the context above given to tar as a file "." means the current
directory and tar will recursively travel the current directory
downward archiving what it finds. This is the same as when you give
tar "Top" and it recurses down that directory. Both are named
directories to tar.
> It creates the archive just fine, when I reference only "Top" as the
> file or input argument. However the problem is that gnu tar won't
> take the piped arguments from the find command to build a similar
> archive.
But you were not piping from find into tar. You were piping from tar
into find. You were doing the opposite of what you thought you were
doing.
> I want to be able to "do it on the fly" meaning I don't
> have to build an empty dir structure then build the archive.
Sure. I tried to suggest something that might work for you. However
my experience is with unix systems and not ms systems and therefore I
don't know if it will actually work on your ms system.
> In the meantime I've found a alternative method, which isn't so bad...
>
> (Just substitue Writing for Top as a folder in the following)
>
> J:\Temp Folders\wbtTemp>xcopy c:\writing "J:\Temp Folders\wbtTemp\writing\"
> /t /e :<-- creates an empty/temporary structure
Whatever you say. I don't do windows.
> J:\Temp Folders\wbtTemp>tar -c -f Writing.tar writing '<-- creates an
> archive of the dir structure
> J:\Temp Folders\wbtTemp>tar -t -v -f Writing.tar ;<--- shows all
> folders
You can avoid the second pass by adding the 'v' option to the first
invocation of tar. Then you would see the verbose table of contents
as the archive is created and could avoid making a second pass over
the data.
> I was hoping there was a way to pipe the folder names to tar, but so far no
> joy.
Did you see my previous suggestion?
bash -c "tar -c -f Test.tar `find Top -type d`"
Seems like it should work to me but I can't test it on your system.
Bob
- GNU Tar on Windows XP, Gadrin, 2008/03/01
- Re: GNU Tar on Windows XP, Gadrin, 2008/03/01
- Re: GNU Tar on Windows XP, Bob Proulx, 2008/03/01
- Re: GNU Tar on Windows XP, Gadrin, 2008/03/02
- Re: GNU Tar on Windows XP,
Bob Proulx <=
- Message not available
- Re: GNU Tar on Windows XP, Gadrin, 2008/03/02
- Re: GNU Tar on Windows XP, Bob Proulx, 2008/03/02
- Message not available
- Re: GNU Tar on Windows XP, Gadrin, 2008/03/02
- Re: GNU Tar on Windows XP, Gadrin, 2008/03/02
- Re: GNU Tar on Windows XP, Gadrin, 2008/03/03
- Re: GNU Tar on Windows XP, Bob Proulx, 2008/03/03
- Re: GNU Tar on Windows XP, Paul Jarc, 2008/03/03
- Message not available
- Re: GNU Tar on Windows XP, Gadrin, 2008/03/03
- Re: GNU Tar on Windows XP, Gadrin, 2008/03/08
- Re: GNU Tar on Windows XP, Mark Blain, 2008/03/08