I believe that this will not preserve all of the various permissions on
the lower subdirectories?
but by adding a second pass which did...
find . -type d -exec ls -al {} \;
and then parse that output to build the chown/chmod commands might work,
I'll give that a shot,
thanks..
"McKown, John" <[EMAIL PROTECTED]>
Sent by: Linux on 390 Port <[EMAIL PROTECTED]>
08/04/2004 11:09 AM
Please respond to Linux on 390 Port
To: [EMAIL PROTECTED]
cc:
Subject: Re: [LINUX-390] tar up directory structure but not contents
Why do this? If you just want to recreate the directory structure, I'd
try something like:
rm RecreateDirectoryStructure.sh
for i in $(find . -type d);do echo mkdir -p $PWD/$i;done
>>RecreateDirectoryStructure.sh
chmod 755 RecreateDirectoryStructure.sh
Then just run RecreateDirectoryStructure.sh when I want to recreate the
directory structure. There may well be a better way.
--
John McKown
Senior Systems Programmer
UICI Insurance Center
Information Technology
This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and its'
content is protected by law. If you are not the intended recipient, you
should delete this message and are hereby notified that any disclosure,
copying, or distribution of this transmission, or taking any action
based on it, is strictly prohibited.
> -----Original Message-----
> From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On
> Behalf Of Jeremy Warren
> Sent: Wednesday, August 04, 2004 10:01 AM
> To: [EMAIL PROTECTED]
> Subject: tar up directory structure but not contents
>
>
> I have a need to backup an extremely deep directory tree, but
> do NOT want
> any of the files within it..
>
> This is what I came up with, but is painfully slow:
>
> find . -type f -print | sed -e 's|^\.\/||g' > FILELIST.TXT
> tar --exclude-from=FILELIST.TXT -czvf dirtree.tar.gz *
>
> When I tried tar --exclude="*" I get the cowardly refusing to
> create empty
> archive message...
>
> Seems as if there must be a better way than this, any suggestions?
>
> Thanks in advance!
>
> -----------------------------------
> Jeremy Warren
> Sr. Systems Programmer
> KB Toy Stores
> mailto:[EMAIL PROTECTED]@kbtoys.com
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: INFO
> LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
>
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390