Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 2009 14:30:05 -0400 (EDT)
From:      vogelke+unix@pobox.com (Karl Vogel)
To:        freebsd-questions@freebsd.org
Subject:   Re: how to copy files without directories
Message-ID:  <20090420183005.B4CDFBE7F@kev.msw.wpafb.af.mil>
In-Reply-To: <op.usonbgwz89vefu@toshizbyszek.lists.lc-words.com> (z.szalbot@lcwords.com)

next in thread | previous in thread | raw e-mail | index | archive | help
Corrected by original poster - to copy directories without files, try this:

  % cd /source/dir
  % find . -type d -depth -print | pax -rwd -pe /dest/dir

Permissions and modification times should be preserved.

-- 
Karl Vogel                      I don't speak for the USAF or my company
A codicil of lawyers            --collective nouns, June 1999 LINGUIST



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