Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/lib/backup/dupdisc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
# dupdisc indev outdev - duplicate all blu-ray disc data tracks
rfork ne
if (! ~ $#* 2 || ~ $1 $2 || ~ $1 /dev/* || ~ $2 /dev/*) {
	echo usage: $0 indev outdev >[1=2]
	exit usage
}
echo copying /dev/$1 tracks to /dev/$2
sleep 2

umount /mnt/cd		>[2]/dev/null
cdfs -d /dev/$1 || exit
cdfs -d /dev/$2 -m /n/copy || exit

for (t in `{ls -p /mnt/cd | grep '^d'}) {
	echo $t:
	grep next /n/copy/ctl
	pump -b 1048576 -k 51200 -d 10 </mnt/cd/$t >/n/copy/wd/$t
	ls -l /n/copy
}
echo 'remember to *not* rm /mnt/cd/wd' >[1=2]
# don't remove /mnt/cd/wd, since that would finalize the disc
# and bugger the permanent toc, at least on bd-r.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.