Copy directory tree with access rights but without files

Tue 15 April 2014 by Mikhail Basov

To copy only directory structure with access rights from current directory (./) to target directory (../test1) issue the following command:

find ./* -type d -print | cpio -pdumv ../test1

Notes:

1) to supress command screen output remove '-v' option.
2) Newer ever use 'cpio' to copy files!!! (because 8Gb file size limitation, use 'pax' instead)


Comments