Plan 9 from Bell Labs’s /usr/web/sources/plan9/rc/bin/replica/scan

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


#!/bin/rc

rfork en

fn usage {
	echo 'usage: replica/scan replica-name [paths]' >[1=2]
	exit usage
}

. /rc/bin/replica/defs $*

need serverroot serverexclude serverproto serverdb serverlog 

must servermount
replica/updatedb -r^$serverroot $serverexclude -p^$serverproto $serverdb >>$serverlog
ndb=`{echo $serverdb | sed 's;(.*)/(.*);\1/n\2;'}
odb=`{echo $serverdb | sed 's;(.*)/(.*);\1/_\2;'}
replica/compactdb $serverdb >$ndb && mv $serverdb $odb && mv $ndb $serverdb

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].