From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <443d96fc7cbe18e690ea8fa3bf4f5f95@ar.aichi-u.ac.jp> Content-Type: text/plain MIME-Version: 1.0 (NeXT Mail 3.3ciscupdate v148.2.1) From: arisawa@ar.aichi-u.ac.jp To: 9fans@cse.psu.edu Subject: Re: [9fans] How to sync venti References: <002901c2538a$49c31870$4bf0b487@dnrc.belllabs.com> <3D751FC9.61D67840@research.bell-labs.com> Date: Wed, 4 Sep 2002 21:49:51 +0900 Topicbox-Message-UUID: e4a6aa38-eaca-11e9-9e20-41e7f4b1d025 Thanks a lot, Dharani and Sean I am now using venti and I am uneasy without that. My feeling about vac is an engine, not a car. I wrote some interface to vac and vacfs; the usage is: term% ve $home/bin/rc term% ve ... 2002/09/01 12:03 /usr/arisawa/venti/memo 2002/09/01 12:06 /usr/arisawa/bin 2002/09/01 13:34 /usr/arisawa/bin/rc 2002/09/01 13:38 /usr/arisawa/bin/rc term% term% vefs 2002/09/01 12:06 /usr/a term% ls -l /n/vac d-rwxrwxr-x M 2516 arisawa arisawa 0 May 3 06:56 /n/vac/bin term% vafs nti/memo term% ls -l /n/vac --rw-rw-r-- M 2518 arisawa arisawa 37 Sep 1 09:12 /n/vac/memo Thes codes are: File: ve #!/bin/rc -e # name: ve # usage: ve [file] # coded by Kenji Arisawa log=$home/venti/log switch($#*){ case 0 awk '{print $2,$3,$4}' $log case 1 if(! test -e $1){ echo $1 not exist exit } d=`{date} # $d is: Sun Sep 1 17:43:14 JST 2002 Jan=01;Feb=02;Mar=03;Apr=04;May=05;Jun=06; Jul=07;Aug=08;Sep=09;Oct=10;Nov=11;Dec=12 day=$d(3) if(~ $#day 1) day=0^$day t=`{ifs=':' echo `{echo $d(4)}} t=$t(1)^':'^$t(2) d=$d(6)^/^$$d(2)^/^$day^' '^$t if(~ $1 /*) p=$1 if not p=`{pwd}^/$1 # `^' is required a=`{grep ' '^$p^'$' $log | tail -1} if(~ $#a 4) v=`{vac -h pc -qd <{echo vac:$a(1)} $p} if not v=`{vac -h pc $p} if(! ~ $vac vac:*){ echo '# vac error' exit 'vac error' } ifs=': ' v=`{echo -n $v} echo $v(2) $d $p >> $log case * echo 'usage: ve [file]' } File: vefs #!/bin/rc -e # name: vefs # usage: vefs patterm # coded by Kenji Arisawa log=$home/venti/log if(~ $#* 0) a=`{tail -1 $log} if not a=`{grep $"* $log | tail -1} if(! ~ $#a 4){ echo '# pattern not exist' exit 'pattern not exist' } unmount /n/vac >[2] /dev/null vacfs -h pc <{echo vac:$a(1)} Of cause you may have more elegant one, but I love these. Kenji Arisawa