Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 2009 14:25:06 +0300
From:      =?UTF-8?B?T2RoaWFtYm8g44Ov44K344Oz44OI44Oz5bee?= <odhiambo@gmail.com>
To:        Zbigniew Szalbot <z.szalbot@lcwords.com>
Cc:        User Questions <freebsd-questions@freebsd.org>
Subject:   Re: how to copy files without directories
Message-ID:  <991123400904200425k36262380q3723feb991b88c52@mail.gmail.com>
In-Reply-To: <op.usomrdzw89vefu@toshizbyszek.lists.lc-words.com>
References:  <op.usomrdzw89vefu@toshizbyszek.lists.lc-words.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 20, 2009 at 2:12 PM, Zbigniew Szalbot <z.szalbot@lcwords.com>wrote:

> Dear all,
>
> I have read the cp manual and I cannot find an option how to copy
> directories without files they contain. Is this possible?
> Thank you very much!


I don't get your requirement.
You'd like to copy empty directories from where to where? Is it a directory
tree or just leaves (TM, patented by me)?
(Leaves are at the same level,, below the branches, while trees contain
branches.

Wildly imagining..from a tree... or branches..

for d in `find /source/path/ -type d`; do mkdir -p /some/path/$d; done

(Untested).




-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
"Clothes make the man.  Naked people have little or no influence on
society."
              -- Mark Twain



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?991123400904200425k36262380q3723feb991b88c52>