> I am trying to use this code sequence to clone a directory tree. > mkdir /usr/test1 > cd /var > find . | cpio -dmp /usr/test1 > > The result is /usr/test1 gets populated with the directory tree but > all the schg flags get stripped off. > > How can I keep the schg flags in the cloned directory?
Did you copy under root? BSD cpio unlike GNU cpio does preserve file flags. $ cpio --version bsdcpio 2.8.4 -- libarchive 2.8.4 $ find /lib | sudo cpio -dmp test 56525 blocks $ ls -lo test/lib | awk '$5 != "-"' total 15595 -r--r--r-- 1 root wheel schg 4440677 Sep 5 22:24 libc.so.7 -r--r--r-- 1 root wheel schg 131655 Sep 5 22:24 libcrypt.so.5 -r--r--r-- 1 root wheel schg 592241 Sep 5 22:24 libthr.so.3 _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"