how to copy files without directories

Karl Vogel vogelke+unix at pobox.com
Mon Apr 20 18:31:02 UTC 2009


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


More information about the freebsd-questions mailing list