Re: How to Copy Directory Structure w/o Copying Files

From: Ross Alexander (ralexan9@telusplanet.net)
Date: Mon Jul 21 2003 - 13:37:01 EDT


On Mon, 21 Jul 2003, Ranbir Singh wrote:

> I am trying to copy the entire substructure of a directory to another directory. How can I do this without copying the actual files in those subdirectories as well?
>
> Thanks for your help,
> RS

You might try

    cd $OLDDIR
    find . -type d |\
        sed -e '/^\.$/d' -e 's/^..//' |\
            cpio -p $NEWDIR

regards,
Ross

--
Ross Alexander
(780) 975 3505 cell / (780) 433 6725 home
ralexan9@telusplanet.net


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:03 EDT