Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
external task and TAR
vlahogiannis
hello,
i am writing an external task that goes into one directory and makes a tarball of its contents then copies and untars that tarball to another workarea.
unfortunately, it will create the initial directory but not the subdirectories. seems to be some kind of permissions issue but i cant pinpoint what.
does anyone have any suggestions for using tar in teamsite and in an workflow?
also: a friend told me there is a way to expand only the directory structure from a tarball. is this true? anyone have experience with this? thanks!
-gv
Find more posts tagged with
Comments
13adam13
why not use the CLT iwcpwa?
Not sure what the result would be if the workareas are in different branches, but it should be worth a shot.
As far as untarring a directory structure, I suppose that you could use -x (exclude file) to specify any non-directory. Might take some pretty fancy regex, though, unless you have some good standards in place.
nipper
Not tar, but find:
This is from Unix Power Tools (an old but still very good book)
to copy the directories but not any files from your current dir (.) to an existing dir /tmp/placeithere
2 commands, use either (xargs is faster, most Unix's now have it) otherwise sed | mkdir
find . -type d -print | sed 's@^
@/tmp/placeithere/
@' | xargs mkdir
find . -type d -print | sed 's@^
@mkdir
@' | (cd /tmp/placeithere; sh)
enjoy
Andy
Jeremy
Hi,
Just a question - are you happy to lose the extended attributes of the files you are tarring? Unless you use iwcmpwa or set the extended attributes after the copy, they will be lost.
Just a point to remember.
Jeremy
Johnny
Just a note
iwcp will copy a file & its EA's.
I think its only available from 5.5.2. Not 100% sure on that though!
John Cuiuli
Consultant
Sydney, Australia