On Tue, Oct 16, 2001 at 10:06:30AM +0200, Oliver Fromme wrote:
> Aus cp(1):
>
> -R [...] Created directories have the same mode as the
> corresponding source directory, unmodified by the
> process' umask.
Arg - ja das hatte ich in meiner ersten Mail uebersehen.
> Die portablere Variante ist natürlich die Kombination find/
> cpio: »cd +cdrom/doc; find . | cpdup -dump $home/temp«.
> Hat den Nachteil, daß man erst in das Quell-Verzeichnis
> wechseln muß (oder noch ein sed einschieben, um den Prefix
> wieder wegzuschnippeln). Außerdem muß man beachten, daß
> cpio die Permissions bei Verzeichnissen nicht korrekt ko-
> poiert, sondern hier einfach die umask nimmt.
Das kann ich so nicht bestaetigen:
ticso(at)cicely5> mkdir delme
ticso(at)cicely5> mkdir delme2
ticso(at)cicely5> mkdir target
ticso(at)cicely5> chmod 700 delme
ticso(at)cicely5> ls -ald target delme delme2
drwx------ 2 ticso wheel 512 Oct 16 11:43 delme
drwxr-xr-x 2 ticso wheel 512 Oct 16 11:46 delme2
drwxr-xr-x 4 ticso wheel 512 Oct 16 11:46 target
ticso(at)cicely5> echo delme | cpio -pdvm target
target/delme
0 blocks
ticso(at)cicely5> echo delme2 | cpio -pdvm target
target/delme2
0 blocks
ticso(at)cicely5> ls -al target/
total 16
drwxr-xr-x 4 ticso wheel 512 Oct 16 11:48 .
drwxrwxrwt 6 root wheel 1024 Oct 16 11:46 ..
drwx------ 2 ticso wheel 512 Oct 16 11:43 delme
drwxr-xr-x 2 ticso wheel 512 Oct 16 11:46 delme2
Und das ist nicht nur unter FreeBSD so.
Hier mal ein SunOS 5.8:
ticso(at)cicely22> mkdir delme
ticso(at)cicely22> mkdir delme2
ticso(at)cicely22> mkdir target
ticso(at)cicely22> chmod 700 delme
ticso(at)cicely22> ls -ald target delme delme2
drwx------ 2 ticso 69 Oct 16 11:35 delme
drwxr-xr-x 2 ticso 69 Oct 16 11:35 delme2
drwxr-xr-x 2 ticso 69 Oct 16 11:35 target
ticso(at)cicely22> echo delme | cpio -pdvm target
target/delme
0 blocks
ticso(at)cicely22> echo delme2 | cpio -pdvm target
target/delme2
0 blocks
ticso(at)cicely22> ls -al target/
total 16
drwxr-xr-x 4 ticso 146 Oct 16 11:36 .
drwxrwxrwt 8 root 390 Oct 16 11:35 ..
drwx------ 2 ticso 69 Oct 16 11:35 delme
drwxr-xr-x 2 ticso 69 Oct 16 11:35 delme2
-- B.Walter COSMO-Project http://www.cosmo-project.de ticso(at)cicely.de Usergroup info(at)cosmo-project.de To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org with "unsubscribe de-bsd-questions" in the body of the messageReceived on Tue 16 Oct 2001 - 11:57:48 CEST