Plan 9 from Bell Labs’s /usr/web/sources/plan9/386/bin/disk/ksync

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


#!/bin/rc

fn dosync {
	echo disk/kfscmd $* sync
	if(disk/kfscmd $* sync)
		echo synced
	if not
		echo sync failed
}

kfs = `{ls /srv/kfs.*.cmd >[2]/dev/null}
switch($#kfs){
case 0
	dosync
case *
	if(test -r /srv/kfs.cmd)
		dosync
	for(i in $kfs)
		dosync -n `{echo $i|sed 's%/srv/kfs.(.*).cmd%\1%'}
}

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.