[Rule-list] vacuum example

Eugene Wong disposable_eugene at hotmail.com
Fri Nov 29 12:14:57 EET 2002


Hi all.

[I typed this on mutt & vim, so if it is messy, my apologies. I'm not too 
good
at using mutt.]

It seems that the vacuum name & idea is something that we might like. So I
decided to make an illustration of how it might be used. If you read after 
my
signature, & pretend that you're looking at my monitor, then you might see 
what
I mean. Other wise, feel free to ask questions.

Just a comment on my choice of /var/db & /var/run: I don't know what the 
proper
place is for the files, so I am open to suggestions, but I think that the 
nature
of these files requires that they be placed in a /var subdirectory.

If there are no objections, suggestions or discussions, by the weekend, then
I'll start bash-scripting according to the suggestions of Martin Stricker.


Sincerely, and with thanks,
Eugene T.S. Wong



[root at ew486 root]# cd /var/run
[root at ew486 run]# ls
console  console.lock  netreport  runlevel.dir  utmp  vacuum.tmp_lst
[root at ew486 run]# cat vacuum.tmp_lst
/usr/share/i18n/
/* Pretend that this directory was already in there, and I had vacuumed a 
few
days ago. */
[root at ew486 run]# cd /lib/kbd/keymaps/i386
[root at ew486 i386]# ls
azerty  dvorak  fgGIod  include  qwerty  qwertz
[root at ew486 i386]# vacuum azerty
[root at ew486 i386]# vacuum -v fgGIod
-rw-r--r--    1 root     root         2251 Sep  5  2001 tr_f-latin5.kmap.gz
-rw-r--r--    1 root     root         1570 Sep  5  2001 trf.kmap.gz
[root at ew486 i386]# vacuum qwertz
[root at ew486 i386]# cat /var/run/vacuum.tmp_lst
/usr/share/i18n/
/lib/kbd/keymaps/i386/azerty/
/lib/kbd/keymaps/i386/fgGIod/
/lib/kbd/keymaps/i386/qwertz/
[root at ew486 i386]# ls
azerty  dvorak  fgGIod  include  qwerty  qwertz
/* Notice that the files are still there. They will be deleted when we run
"vacuum --empty" or whatever the script is called. */
[root at ew486 i386]# cd /usr/lib/locale/
[root at ew486 locale]# ls
/* Just pretend that there is a long list of files that I don't want. */
[root at ew486 locale]# cd ..
[root at ew486 lib]# vacuum locale/
[root at ew486 lib]# cd /var/run
[root at ew486 run]# cat vacuum.tmp_lst
/usr/share/i18n/
/lib/kbd/keymaps/i386/azerty/
/lib/kbd/keymaps/i386/fgGIod/
/lib/kbd/keymaps/i386/qwertz/
/usr/lib/locale/
[root at ew486 run]# vacuum --empty; cat vacuum.tmp_lst
[root at ew486 run]# cat /var/db/vacuum.db
/usr/share/i18n/
/lib/kbd/keymaps/i386/azerty/
/lib/kbd/keymaps/i386/fgGIod/
/lib/kbd/keymaps/i386/qwertz/
/usr/lib/locale/
/* Each line represents 1 execution of "vacuum". Also notice that
/var/run/vacuum.tmp_lst is now empty, and /var/db/vacuum.db now contains all 
of
the file names & directory names. In this example, I never vacuumed any 
files as
I intended to, but hopefully you get the idea. */
[root at ew486 run]# ls /lib/kbd/keymaps/i386/
dvorak  include  qwerty
/* Notice the missing directories. */
[root at ew486 run]# ls /usr/lib
/* Pretend that locale/ is missing from /usr/lib */
[root at ew486 run]# ls /usr/share
awk   emacs          magic	 man   openldap   ssl	    vim
dict  empty  info    magic.mgc	 misc  pixmaps	  tabset    zoneinfo
doc   groff  locale  magic.mime  nmap  printconf  terminfo
/* i18n/ is missing for the purposes of this illustration. In the real 
situation
this directory would list properly. I just deleted the text for the sake of 
this
sample, & didn't want to rearrange everything. */

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail



_______________________________________________
Rule Project HOME PAGE:  http://www.rule-project.org/rule/
Rule Development Site:   http://savannah.gnu.org/projects/rule/
Rule-list at nongnu.org
http://mail.nongnu.org/mailman/listinfo/rule-list



More information about the Rule-list mailing list