( ** Go back to PARENTPAGE ../Monitoring-Changes-in-UNIX-Directories.html)
( ** Go back to HOMESITE https://www.tcnd.com)
( ** Go back to SetSphere https://www.setsphere.com)

Monitor a UNIX directory from within ASPL console

Glob a directory on the UNIX filesystem, assign it to a set variable, and interrogate this set variable; should any change be detected, the set variable is turned into a differential group variable. You can apply ASPL differential group operators on the variable to view the changes that occured into the temporal instances of the differential group variable.

ASPL 1> mydir = ggdir(dir,/tmp/testdir1)
glob the directory /tmp/testdir1 and assign it to the set variable mydir

ASPL 2> sleep 2
sleep 2 seconds

ASPL 3> ?10,2 mydir
interrogate the set variable mydir ten times with a delay of two seconds in between each iteration

ASPL 4> @ mydir
print the differential set variable mydir

ASPL 5> g@,`ks~ mydir
use the differential group operator g@ to display the differences in the differential set variable mydir

ASPL 6> d@,`ks~ mydir
display the differences in the subgroups using the differential group operator d@

ASPL 7> f@,`ks~ mydir
display the differences in the elements using the differential group operator f@

ASPL 8> playchanges mydir
display the changes between the instances registered in the differential set variable mydir, this will also show the rate of change

ASPL 9> intermittentarc 1
set intermittance to 1

ASPL 10> playchanges mydir
display the changes intermittently between the instances registered in the differential set variable mydir

ASPL 11> intermittentcontinuous

ASPL 12> intermittentcontinuous 1
set intermittentcontinuous to 1

ASPL 13> playop gD,`ks~ mydir
play of the operator of symmetric group difference on the differential set variable mydir

ASPL 14> gD,`ks~ @mydir
display the symmetric group difference (tick for changes in ks vector) on all the instances registered in mydir

ASPL 15> gD, @mydir
display the symmetric group difference on all the instances registered in mydir

ASPL 16> save MONITORDIRCHANGES

ASPL 17> quit