File: adam.html

package info (click to toggle)
lg-issue81 2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,064 kB
  • ctags: 134
  • sloc: perl: 239; makefile: 34; sh: 34
file content (1472 lines) | stat: -rw-r--r-- 51,028 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
<!--startcut  ==============================================-->
<!-- *** BEGIN HTML header *** -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD>
<title>The Weekend Mechanic LG #81</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
ALINK="#FF0000">
<!-- *** END HTML header *** -->

<CENTER>
<A HREF="http://www.linuxgazette.com/">
<IMG ALT="LINUX GAZETTE" SRC="../gx/lglogo.png" 
	WIDTH="600" HEIGHT="124" border="0"></A> 
<BR>

<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="lg_bytes.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue81/adam.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom"  ></A><A HREF="../lg_faq.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="adam2.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom"  ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
<P>
</CENTER>

<!--endcut ============================================================-->

<H4 ALIGN="center">
"Linux Gazette...<i>making Linux just a little more <font COLOR="red">lovable!</font></i>"
<img ALT="" SRC="../gx/adam/heart.png" WIDTH="30" HEIGHT="25">
</h4>

<p> <hr> <p> <!--===================================================================-->

<p ALIGN=CENTER><img ALT="[picture of mechanic]" SRC="../gx/adam/mechanic.png" ALT="Weekend Mechanic Logo" ALIGN=BOTTOM WIDTH=399 HEIGHT=135 BORDER=0></p>

<h1 ALIGN=CENTER><font COLOR="maroon">The Weekend Mechanic</font></h1>

<h4 ALIGN=CENTER>By <a HREF="mailto:thomas_adam16@yahoo.com">Thomas
Adam</a></h4>

<p> <hr> <p> <!--===================================================================-->

<!-- END header -->
<!-- =======================================================================-->

<!-- --------------- -->
<!-- BEGIN: contents -->
<!-- --------------- -->

<UL>
  <LI><A HREF="#preamble">Welcome to the July edition</A></LI>
  <LI><A HREF="#quotas">A Brief Introduction: Quotas</A></LI>
  <LI><A HREF="#dansg">A Brief Introduction: DansGuardian</A></LI>
  <LI><A HREF="#touchrec">Touchrec: Recursively touches files in a
  directory</A></LI>
  <LI><A HREF="#gnufind">GNU Find: Evaluating its effectiveness</A></LI>
  <LI><A HREF="#intjf">Interview: John M. Fisk</A></LI>
  <LI><A HREF="#closet">Closing Time</A></LI>
</UL>

<!-- --------------- -->
<!-- END: contents   -->
<!-- --------------- -->

<HR>

<! -- ======================================================================= -->

<! -- --------------- -->
<! -- BEGIN: preamble -->
<! -- --------------- -->

<H2><A NAME="preamble">Welcome to the July edition</A></H2>

<P>Well Howdy. Glad you could all make it. How are you all??? Still keeping
up the pace with the rest of the LG thus far? I hope so, 'cos I can't see
that this article is going to be any different :-)</P>

<P>News for this month?? Well, I have installed myself in my house now.
When I get the chance, I'll get some pictures together for you all to have
a sneak preview into the isolated, but pretty corner of Somerset that I
now reside in when I am not at University, that is.</P>

<P>I also have a new job!! I work in a small factory, which produces eight
different types of luxury dessert for a chain-store called <I>Waitrose</I>.
For those of you who don't know who this company is, <I>Waitrose</I> is
part of the <I>John Lewis Partnership, plc</I>. They specialise in nice,
high quality food. For the really curious among you, here is a list of the
desserts I make:</P>

<UL>
  <LI>Chocolate Mousse</LI>
  <LI>Zabaglioni (Amorretti biscuit-base mousse)</LI>
  <LI>Lemon Dessert</LI>
  <LI>Rhubarb Syllabub</LI>
  <LI>Blackberry Syllabub</LI>
  <LI>Creme Brulee</LI>
  <LI>Creme Brulee with Chocolate and Grand Marnier</LI>
  <LI>Creme Brulee with Raspberry Compote</LI>
</UL>

<P>I start at 6:00am :-) That's the only the drawback. However it does
mean that I finish around 2-4 in the afternoon.</P>

<P>That's about as exciting as my life gets really, I think it is time to
move on to some proper material.<B> Linux.....</B></P>

<!-- ============= -->
<!-- END: preamble -->
<!-- ============= -->

<HR>

<!-- ======================================================================== -->

<!-- ============= -->
<!-- BEGIN: Quotas -->
<!-- ============= -->

<H2><A NAME="quotas"></A>A Brief Introduction: Quotas</H2>

<!-- ====================== -->
<!-- BEGIN: Content Listing -->
<!-- ====================== -->

<UL>
  <LI><A HREF="#Q-wiq">What is Quota?</A></LI>
  <LI><A HREF="#Q-inst">Installation</A></LI>
  <LI><A HREF="#Q-sq">Setting Quotas</A></LI>
  <LI><A HREF="#Q-an">An Example</A></LI>
</UL>

<!-- ==================== -->
<!-- END: Content Listing -->
<!-- ==================== -->

<HR>

<!-- ============================ -->
<!-- BEGIN: Quotas: What is Quota -->
<!-- ============================ -->


<H2><A NAME="Q-wiq">What is Quota?</A></H2>

<P>Way, way back in <A HREF="../issue13/slew.html">
issue 13</A> Jim Dennis wrote a small article about how to set up your 
Linux machine so that it would tell you if you were going to run out of 
disk space. (SLEW). I read this article, and decided that you can make sure that 
your users do not run amok on disk space by enforcing a set <B>rules</B> 
by either specifying the number of inodes or blocks that a particular 
user cannot exceed.</P>

<P>Quota is handled on a per-user basis though, and is only active on one
file system at a time. Thus, if a user has access to more than one file
system, and you wish to enforce quotas on each of them, then you must do so
separately.</P>

<P>So in short, quota is a way of setting maximum disk space that a user
can consume, at any one time</P>

<HR WIDTH=25%>

<!-- ========================== -->
<!-- END: Quotas: What is Quota -->
<!-- ========================== -->

<!-- ========================== -->

<!-- =========================== -->
<!-- BEGIN: Quotas: Installation -->
<!-- =========================== -->

<H2><A NAME="Q-inst">Installation</A></H2>

<P>As of Kernel version >=2.0, Quota support has been bundled in with the
kernel, and as such, if you come from the dark ages, and have a kernel
version <2.0, then obtain the latest source (<A
HREF="http://www.kernel.org">www.kernel.org</A>) NOW!!</P>

<P>And as for the rest of the GNU/Linux planet, you should find that you
already have quota support enabled by default in the kernel anyway. If you
<I>think</I> you have not, then download the latest stable release and
re-compile. It can't hurt.....much :-). For instructions on how to do this,
please refer to the INSTALL file, under the source directory.</P>

<P>Incidentally, for those users running a nice shiny SuSE Box, Quota
automatically comes compiled into the kernel :-)</P>

<P>But the fun-and-games continue, since Quota is not directly runnable
from the kernel itself (i.e. it is not a self-contained module). You have
to either install an RPM for Source file.</P>

<P>The RPM file (should you be using a distribution that uses this system
of package handling) in question is:</P>

<B>quota-1.70-263.rpm</B>

<P>And the tarball file is called:</P>

<B>all.tar.gz</B>

<P>Both of which are available from the following FTP repository:</P>

<A HREF="ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus/subsystems/quota/">
ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus/subsystems/quota/</A>

<P><U>To install the RPM file:</U></P>

<P>Issue the command:</P>

<B>su - -c'rpm -i /path/to/quota-1.70-263.rpm'</B>

<P><U>To install the source file</U></P> 

<PRE>
1. <B>su -</B>
2. <B>cd /path/to/tarball/</B>
3. <B>tar xzvfm ./all.tar.gz</B>
4. <B>./configure</B></PRE><I>[ Allow for configure script to run ]</I>
<PRE>
5. <B>make && make install</B>
6. <B>logout</B></PRE><I>[ To exit out of root's &quot;su;ed&quot; account
]</I>

<P>That's all there is to it :-) Now the <I><B>real</B></I> fun begins</P>

<!-- ======================== -->
<!-- END: Quota: Installation -->
<!-- ======================== --> 

<HR WIDTH=25%>

<!-- ============================ -->
<!-- BEGIN: Quota: Setting Quotas -->
<!-- ============================ --> 

<H2><A NAME="Q-sq">Setting Quotas</A></H2>

<P>The first step in configuring this, is to have a logical idea in your
head as to how you are going to organise this. Quota gives you the option
of either specifying a single user, or a group (which has been assigned to
specific users), or both. If you are on a large network, then perhaps a
mixture of the two is preferable. Think about it :-)</P>

<P>Group version is usually good, if you assign <B>all</B> users to that
specific group. Makes life easier, <EM>n'est pas?</EM></P>

<P>But the first actual step is to make some system-wide changes. For
this, log in as user <B>root</B>. Please though, do not simply
&quot;su&quot; in, as this simply changed your effective UID, and does
nothing about export variables, etc.</P>

<P>We must first modify &quot;/etc/fstab&quot; so that the kernel knows
that the filesystem mount point will make use of the quota support. A
typical &quot;/etc/fstab&quot; file looks like the following:</P>

<PRE>
/dev/hda1	/boot	       ext2	defaults 1 2
/dev/hda2	swap	       swap	defaults 0 2
/dev/hda3	/	       ext2	defaults 1 1
/dev/cdrom	/cdrom	       auto	ro,noauto,user,exec 0 0
/dev/fd0	/floppy	       auto	noauto,user 0 0
proc	        /proc	       proc	defaults 0 0
usbdevfs	/proc/bus/usb  usbdevfs	defaults 0 0
devpts	        /dev/pts       devpts	defaults 0 0


#NFS clients....
#Updated: Thomas Adam, Tuesday 03:45am??? -- Can't remember.
server:/etc	    /mnt/etc    nfs    rw,user,rsize=1024,wsize=1024,hard,intr 0  0
server:/home	    /mnt/home   nfs    rw,user,rsize=1024,wsize=1024,hard,intr 0  0
server:/usr/doc/lg/lg/lwm	    /mnt/lwm	nfs    rw,user,hard,intr 0  0
#server:/usr	    /mnt/usr    nfs    rw,user,hard,intr 0  0
server:/cdrom       /cdrom      nfs    ro,user,rsize=1024,wsize=1024,hard,intr 0  0
server:/dev	    /mnt/dev	nfs    ro,user,rsize=1024,wsize=1024,hard,intr 0  0
</PRE>

<P>What we are concerned with, is not the last part of the file <I>[ ** although
<B>quota</B> can be used with <B><I>nfs</I></B> exported file types -- see
&quot;man rquota&quot; ** ]</I>, but with
which mount point is to be issued with quota support. This will depend
upon where your user's $HOME directories are located. Unless you have got a
separate partition or drive for this, then typically the mount points you
will want to use is either &quot;/&quot; or &quot;/usr&quot; (if
<B>/home</B> is a symlink to &quot;/usr/local/home/&quot; -- and
&quot;/usr&quot; is on a separate drive or partition.)</P>

<P>Now I come back to my original question that I first posed at the
beginning of this section. How are the users going to be managed? If you
have decided to do it just on a user by user basis, then add
<B>usrquota</B> to your fstab file. If you are going to do it by group then
add <B>grpquota</B>. If you are going to use a mixture of the two, then add
them both.</P>

<P>Thus, we are now concerned with adding to the fourth field the
following:</P>

<PRE>
/dev/hda3	/	       ext2	defaults,<B>usrquota,grpquota</B> 1 1
</PRE>

<P>Change as appropriate for your version of fstab. If you are unsure as to
which quota to use, I recommend that you include both in the fstab file,
since it means that should you need to swap, you'll already have it set up.
Now save the file.</P>

<P>OK. The next thing we have to do is to make sure that for whichever
option you chose (i.e. namely <B>usrquota</B> or <B>grpquota</B>), that you
create the necessary file(s) on the root of the partition that you changed
in the fstab file. To do this, enter the following commands (still as user
<B>root</B>)</P>

<PRE>
touch /top/of/partition/quota.user && chmod 600
/top/of/partition/quota.user

touch /top/of/partition/quota.group && chmod 600
/top/of/partition/quota.group
</PRE> 

<P>Lastly, you have to ensure that when your system boots up, that quotas
are enabled along with it. For those of you who installed <B>Quota</B> from
an RPM/.DEB, etc should find that they already have a script named
&quot;quota&quot; or something similar in &quot;/etc/init.d/&quot;. If you
installed from source however, this might not be the case, which means that
you will have to add the following script into your main init-script AFTER
the mounting of all files in &quot;/etc/fstab&quot; has taken place.</P>

<PRE>

<A HREF="misc/adam/quota.sh.txt">(text version)</A>

#Check quotas
[ -x /usr/sbin/quotacheck ] && {
  echo "Checking Quotas (please wait)...
  /usr/sbin/quotacheck -avug
  echo "Done."
} || {
  echo "Checking Quotas FAILED"
}

[ -x /usr/sbin/quotaon ] && {
  echo "Initialising Quotas..."
  /usr/sbin/quotaon -avug
  echo " Done."
} || {
  echo "Turning Quotas On: FAILED
}
</PRE>

<P>What the above does, is runs a test on the named file, for the
&quot;-x&quot; flag which means that it is checking to ensure that the file
is executable, before it processes the rest of the script. It checks to see
what quotas are defined (if any), and then goes on to enable them.</P>

<P>Once you have done that, issue:</P>

<PRE>
<B>init 6</B>
</PRE>

<P>And wait for your computer to reboot. <BR><BR><FONT COLOR="red">Caveat Emptor:
If you did have to recompile your kernel, ensure that if you are using LILO
as your boot-loader that you run: <BR><BR>
<B>lilo</B><BR><BR>
BEFORE you reboot so that it knows about your new kernel-image
:-)</FONT></P>

<!-- ========================== -->
<!-- END: Quota: setting quotas -->
<!-- ========================== --> 

<HR WIDTH=25%>

<!-- ============================ -->
<!-- BEGIN: Quota: An Example     -->
<!-- ============================ --> 

<H2><A NAME="Q-an">An Example</A></H2>

<P>Right. We should now have your machine acknowledging the fact that we
are going to use Quota. What we haven't done yet, is the most important
bit, and that is, who or which groups will be using the quota rule.</P>

<P>What I have decided to do, is to use an example if a user, and show you
how you go about setting up a quota limit for him. We shall call the user
<B>lg</B>.

<P>Assuming <B>lg</B> is already on your system, what we must do is,
depending on which format you are using, edit the appropriate file. For the
purposes of this example, I shall do this on a per-user basis (i.e. I shall
be using the <B>usrquota</B> format, although everything I shall explain
here, is exactly the same for the <B>grpquota</B> option, if you have
decided to do that.</P>

<P>The command that we shall be using is called &quot;edquota&quot; What we
must do is edit a quota for user <B>lg</B> by issuing the command:</P>

<PRE>edquota -u lg</PRE>

<P>What this does, is launches an editor, and opens a new quota. If you
haven't set the environment variable EDITOR="/usr/bin/jed" or some
equivalent editor, then this command will not work. To set up this
variable, add this to your &quot;~/.bash_profile&quot;</P>

<PRE>
EDITOR="/usr/bin/jed"
export EDITOR
</PRE>

<P>Change the program as you see fit, i.e. Vi, jed, joe, emacs, etc. Then
to make the changes active, source the file, by typing:</P>

<PRE>source ~/.bash_profile</PRE>

<P>What you should find, is that for user <B>lg</B> you get something
similar to the following:</P>

<PRE>
Quotas for user lg:
/dev/hdb2: blocks in use 0, limits (soft = 0, hard = 0)
      	   inodes in use: 356, limits (soft = 0, hard = 0)
</PRE>

<P>Now your thinking: &quot;err....&quot :-) Don't worry. It is much more
simpler than it looks.</P>

<P><B>Blocks</B> indicate the total number of blocks that a user has used
on a partition (measured in Kilobytes, KB).</P>

<P><B>Inodes</B> indicate the total number of files that a user has on the
partition. N.B. These values you cannot change.</P>

<P>What we are concerned with, is the bit in brackets, right at the end of
each line. This is the key to setting the entire quota. You'll notice that
there are two options, one for <B>soft</B> and one for <B>hard</B>. 

<P><B>Soft limits</B> indicate the maximum amount of space (in Kilobytes)
that <B>lg</B> is allowed to have. It acts as a boundary which when set
along with a <B>grace period</B> informs to user <B>lg</B> that he is
exceeding his limit.</P>

<P>A <B>grace</B> limit is a period of time before the <B>soft</B> limit is
enforced. This can be set from (sec)onds, (min)utes, hour, day, week,
month. This is set by issuing the command:</P>

<PRE>edquota -t</PRE>

<P>You'll see that you should get the following:</P>

<PRE>
Time units may be: days, hours, minutes, or seconds
Grace period before enforcing soft limits for users:
/dev/hdb2: block grace period: 0 days, file grace period: 0 days
</PRE>

<P>Change both values for <B>block</B> and <B>file</B> to whatever you see
fit. I recommend 14 days (2 weeks) for both. But then, I am generous
:-)</P>

<P>A <B>hard</B> limit indicates the maximum amount of space that a user
<I>cannot</I> exceed. This only works when a grace period has been set.</P>

<P>That's all there is to it. Now, you are probably wondering how the hell
you are supposed to assign the same quota to every user on your system.
Well, having just followed the example for <B>lg</B>, what you can do, is
to use user <B>lg</B> as a template, and issue the command:</P>

<PRE>awk -F: '$3 >= 500 {print $1}' /etc/passwd'</PRE>

<P>What this does, is prints a list to the screen of all users who start
with a UID greater than 499 (i.e 500 onwards). If this set of users on the
screen looks OK, then we can use the above, in conjunction with the
<B>edquota</B>, as shown below:</P>

<PRE>edquota -p lg $(awk -F: '$3 > 499 {print $1}' /etc/passwd')</PRE>

<P>This uses the quota we have already enabled for <B>lg</B> as a template
to assign it to the string of users that the awk script produces for
us.</P>

<P>That's all there is to it :-). I have found quota to be an excellent
tool in keeping users at bay. I use it for my non-root account, as it stops
me from going wild in my home directory, and thus forces me to clean it out
once in a while.</P>
 
<!-- ========================== -->
<!-- END: Quota: An Example     -->
<!-- ========================== --> 

 
<HR>

<!-- ======================== -->

<!-- ============================ -->
<!-- BEGIN: Dansguardian          -->
<!-- ============================ --> 

<H2><A NAME="dansg">A Brief Introduction: DansGuardian</A></H2>

<UL>
  <LI><A HREF="#DG-wis">What is DansGuardian?</A></LI>
  <LI><A HREF="#DG-ins">Installation</A></LI>
  <LI><A HREF="#DG-conf">Configuration</A></LI>
</UL>

<HR WIDTH=25%>

<H2><A NAME="DG-wis">What is DansGuardian?</A></H2>

<P>For those of you who followed my last miniature introduction to the world
of linux proxying for <B>Squid</B> and <B>SquidGuard</B>, 
<A HREF="http://www.linuxgazette.com/issue78/adam.html">will remember</A> that
I showed you how you could filter certain webpages that matched a certain
regex. What <B>Dansguardian</B> does. is take the concept of filtering and
stretches it so that you can filter webpages, based on <B>content!!</B>. Also
though, Dansguardian allows you to filter out mime-types and block file
extensions, thus meaning that should your users have the unfortunate punishment
of using an M$-Windows machine, you can block files such as <B>.exe, .com,
.dll, .zip .... etc</B></P>

<!-- ======================================== -->

<HR WIDTH=25%>

<H2><A NAME="DG-ins">Installation</A></H2>

<P>Dansguardian can be obtained from the following:</P>

<A HREF="http://www.dansguardian.org">http://www.dansguardian.org</A>  

<P>You can either download an RPM or tar.gz file from his site. If you're a
budding Debian GNU/Linux user, then you can always use the <B>alien</B>
package to convert the RPM file to a DEB file :-). To actually install the
files, follow the <A HREF="#Q-inst">instructions</A> as in the Quota
section.</P>

<P>It is also worth noting, that Dansguardian requires the use of the
<B>nb++</B> library. There is a link to a download site, on the main site
of dansguardian. This library is used to look at the content of webpages,
and is thus essential to the operation of Dansguardian.</P>

<P>On install, dansguardian, main program is installed as
&quot;/usr/sbin/dansguardian&quot. What you must do, is either in
&quot;/etc/init.d/rc.local&quot; OR &quot;/etc/init.d/boot.local&quot;
(depending on which distribution you are using), add:<P>

<PRE>
/usr/sbin/dansguardian 
</PRE>

<P>So that Dansguardian is loaded up on init.</P>

<!-- ======================== -->

<HR WIDTH=25%>

<!-- ======================== -->
<!-- BEGIN: DG: Configuration -->
<!-- ======================== --> 

<H2><A NAME="DG-conf">Configuration</A></H2>

<P>There really is not <I>too</I> much to configure when it comes to
Dansguardian. What takes all the work, is the various regex expressions
that you may want to build for really accurate content filtering.</P>

<P>It should be pointed out that DansGuardian can be used in conjunction
with <A
HREF="http://www.linuxgazette.com/issue78/adam.html#squidg">SquidGuard</A>
so that you don't have to replace any existing filters that you may already
have in place :-) Good, eh?</P>

<P>So, the first thing we should do, is check where the package has put the
configuration files. Well, it should be no surprise that they have been out
in &quot;/etc/dansguadian&quot;, and it is the files contained in this
directory that we shall concentrate on. We shall begin by looking at the
configuration file <B>/etc/dansguardian/dansguardian.conf</B>.</P>

<P>This is all the settings that Dansguardian will require. Typically, the
only options that I have had to change are listed below:</P>

<PRE>
#DansGuardian config file

[Reporting]
reportinglevel = 1 #  0 = just say 'Access Denied'
                   #  1 = report why but not what denied phrase
                   #  2 = report fully

[Network Settings]
filterport = 8080   # the port that DansGuardian listens to
proxyip = 127.0.0.1 # loop back address to access squid locally
proxyport = 3128    # the port DansGuardian connects to squid on
accessdeniedaddress = "http://grangedairy.laptop/cgi-bin/dansguardian.pl"

[Logging] # 0 = none  1 = just denied  2 = all text based  3 = all requests
loglevel = 2

[Content Filtering]
bannedphraselist = "/etc/dansguardian/bannedphraselist"
bannedextensionlist = "/etc/dansguardian/bannedextensionlist"
bannedmimetypelist = "/etc/dansguardian/bannedmimetypelist"
exceptionsitelist = "/etc/dansguardian/exceptionsitelist"
exceptioniplist = "/etc/dansguardian/exceptioniplist"

[Phrase Scanning] # 0 = normal  1 = intelligent
scanningmode = 1
# normal does a phrase check on the raw HTML
# intelligent does a normal check as well as removing HTML tags and
#  multiple blank spaces, tabs, etc - then does 2nd check


[ ** Many other options elided ** ]

</PRE>

<P>The only things I changed here, was the <B>filterport</B>, the
<B>proxyport</B> and the <B>accessdeniedaddress</B> tags, to reflect the
configurations I used in <B>&quot;/etc/squid.conf&quot;</B>. Having
changed your options accordingly, you can save the file, and ignore it
:-)</P>

<P>OK, moving on. In the same directory, you should notice files with the
following filenames:</P>

<UL>
  <LI>bannedphraselist</LI>
  <LI>bannedextensionlist</LI>
  <LI>bannedmimetypelist</LI>
  <LI>exceptionsitelist</LI>
  <LI>exceptioniplist</LI>
</UL>

<P>I shall take each file in turn, and explain what each one does. Where
appropriate, I shall list small portions of the file.</P>

<B>bannedphraselist</B>

<P>This file contains explicit words and as such, I shall not list its
contents here. Suffice to say, this is the file that holds keywords which
are blocked if found anywhere in the HTML page.</P>

<P>As you will see, each word is enclosed within &lt;  &gt; signs, as
in:</P>

<PRE>&lt; sex &gt;</PRE>

<P>These angled brackets are important, since without them, the word would
not be blocked.</P>

<P>You will also notice, throughout the file that some words have a space
either side of the angle brackets, and some only have one space, either end
of the bracket. This is important, since it says to dansguardian how to
block the word.<P>

<PRE>&lt; sex &gt;</PRE>

<P>Indicates that the word sex (and only the word sex) should be blocked
when it is found, nothing more.</P>

<PRE>&lt;sex&gt;</PRE>

<P>Indicates that the word sex should be blocked, regardless of where it is
found in a sentence or phrase. I.e. if it is found in
<B>hellosexyhowareyou?</B> then it will be blocked.</P>

<PRE>&lt; sex&gt;</PRE>

<P>Means that anything is blocked, to the left of the word.</P>

<PRE>&lt;sex &gt;</PRE>

<P>Is the converse of the above.</P>

<P>As you look down the file, you'll see a number of different words which
are being blocked. :-) You will also notice that there a number of comments
of example words or hyphenated phrases which are not blocked, because you
have already blocked part of that word. For example:</P>

<PRE>&lt;middlesex&gt;</PRE>

<P>Need not be blocked, since the phrase:</P>

<PRE>&lt;sex&gt;</PRE>

<P>is already blocking any other word that contains the word <B>sex</B>.
That is an important fact to remember of you are going to be adding to the
list at a later date.</P>

<B>bannedextensionlist</B>

<P>Simply contains a list of file extensions that will be blocked by
dansguardian, thus:</P>

<PRE>
#Banned extension list

.gz 
.tar
.zip
.mp3
.mpeg
.mpg
.avi
.exe
.sys
.ini
.bat
.doc
.xls
.scr
</PRE>

<P>This is pretty much self explanatory!!</P>

<B>bannedmimetypelist</B>

<PRE>
# banned MIME types

audio/mpeg
audio/x-mpeg
audio/x-pn-realaudio
video/mpeg
video/x-mpeg2
video/acorn-replay
video/quicktime
video/x-msvideo
video/msvideo
application/gzip
application/x-gzip
application/zip
application/compress
application/x-compress
application/java-vm
</PRE>

<P>MIME types are used to identify different multi-media portions of
applications, and as such is particularly useful when sending e-mail,
however MIME has its uses in HTML too :-)</P>

<P>Again, I would add some other options here.</P>

<B>exceptionsitelist</B>

<P>Lists those sites which, are allowed to be viewed, even though it would
ordinarily be blocked by the rules defined in any of the other files,
thus:</P>

<PRE>
#Sites in exception list
#Don't bother with the www. or
#the http://

jadeb.com
</PRE>

<P>You can obviously add more sites as you are going along :-)</P>

<B>exceptioniplist</B>

<PRE>
#IP addresses to ignore and just
#pass straight through.
#
#These would be servers which
#need unfiltered access for
#updates.  Also administrator
#workstations which need to
#download programs and check
#out blocked sites should be
#put here.
#
#Only put IP addresses here,
#not host names

192.168.0.1
192.168.0.2
192.168.42.2

#these are examples above
#delete them and put your own
#in if you want
</PRE>

<P>The comments in this, pretty much say all :-). Obviously I would say be
careful as to which machines you allow override access to :-)</P>

<P>And that rather short explanation explains how dansguardian works. You
may well find, as I did, that it is very frustrating at first, since it
really does block what you tell it to, but once you yourself have shoved a
whole load of domain names into the <B>exceptionsitelist</B>, things should
not be too bad at all! :-)</P>

<!-- ===================== -->
<!-- END: DG: ALL SECTIONS -->
<!-- ===================== --> 

<HR>

<!-- ========================== -->
   
<!-- ===================== -->
<!-- BEGIN: Touchrec       -->
<!-- ===================== --> 

<H2><A NAME="touchrec">Touchrec: Recursively touches files in a
directory</A></H2>

<P>In <A HREF="http://www.linuxgazette.com/issue66/tag/2.html"
TARGET="_blank">issue66</A>, there appeared a thread about how to 
recursively touch files in a given directory. Since the GNU 
version of touch does not support an option (yet), a few 
suggestions were offered using GNU find.</P>

<P>Indeed I was intrigued by this idea. I have often been in a situation
where having a recursive feature to touch all files and/or directories was
a necessity. Such an example is where I had forgotten to add the
&quot;m&quot; flag to the tarball I was un-tarring, and as a result had a
while load of future modification dates on my files (See <A
HREF="../issue79/lg_tips.html#tips/3">
issue79</A>). Deleting the entire directory would have been a pain, since
it took <I>ages</I> to untar. Thus, I decided to write the following
shell-script :-)</P>

<A HREF="misc/adam/touchrec.tar.gz">(tar.gz file)</A>

<P ALIGN="center">-----------------</P>

<PRE>
#!/bin/bash
##########################################################
#touchrec -- Recursively "touches" files in a directory  #
#Ackn:       Written for TAG (Linux Gazette) :-)         #
#Version:    Version 1.0 (first draft)                   #
#Author:     Created by Thomas Adam                      #
#Date:       Saturday 15 June 2002, 16:58pm BST          #
#Contact:    thomas_adam16@yahoo.com                     #
##########################################################

#Declare Variables
bname=$(basename $0)   #Basename of program (path stripped)
curr_dir=$(pwd)	       #Current dir
dironly=0              #-d off
filesonly=0   	       #-f off
quiet=0       	       #-q off
toplevel=    	       #-l off
redir=$(tty)  	       #verbosity redirection tag
version="$bname: Created by Thomas Adam, Saturday 15 June 2002, 16:58pm BST,
Version 1.0"

#Start Procedures

#Help Procedure
help_user() 
{
echo "
$bname usage: [-s directory path] [-q] [-d] [-f] [-t] [-h] [-v]

where:

-s (optional starting directory, default is 'pwd')
-q (quiet mode -- suppresses verbosity)
-d (only touch directories)
-f (only touch files)
-t (touches the top-level directory, i.e. '.')
-h (prints this message)
-v (version of program)

Issue command \"man \\1 touchrec\" for full documentation
"

exit 0
}

run_default ()
{
  for lists in $(find ${curr_dir} ${toplevel} -depth 2> /dev/null); do
    #If it's a directory....
    [ -d $lists ] && {
      #All directories -- yes
      [ $dironly = 0 ] && {
        #Just the files? -- continue to the next instance of a loop, if so
      	[ $filesonly = 1 ] && {
	  continue
	}
      	echo "touching dir $lists/" >$redir && touch -c $lists
	continue
      } || [ $dironly = 1 ] && {
      	#then we are only checking for directories
	echo "touching dir $lists/" >$redir && touch -c $lists
      }
    #This time check for files...
    } || [ $dironly = 0 ] && {
      [ -f $lists ] && {
      	[ $filesonly = 1 ] && {
	  #Only checking for files....
      	  echo "touching files $lists" >$redir && touch -c $lists
      	  continue
      	} || [ $filesonly = 0 ] && {
	   #As a result of no flags passed at run-time, this executes :-)
           echo "touching files $lists" >$redir && touch -c $lists
      	} 
      }
    }   
  done
}

#Main 

#Check for presence of command-line switches
if [ "$#" = 0 ]; then
  echo "No command-line args given"
  curr_dir=$(pwd)

else

  while getopts ":hqlfvdts: " opts; do
    case $opts in
      d )
      	#Only Check for Directories
	dironly=1
      ;;

      q )
      	#Quiet -- suppresses verbosity to console
      	quiet=1
      	redir="/dev/null"	
      ;;

      f )
      	#Only check for files, no directories
      	filesonly=1
      ;;
      
      t )
      	#Only process the top-level directory "."
      	toplevel="-maxdepth 1"
	#echo $toplevel  #for debugging purposes
	;;
	
      s )
	#Get path as specified
	#If $optarg is blank, print help_user()
	
	[ $OPTARG = "" ] && {
	  echo "No Parameter Given"
	  help_user
	} || curr_dir=${OPTARG}
      
      ;;
      
      h )
      	#Print help message
	help_user
      ;;
      
      v )
      	#Prints the version
	echo $version
      	exit 0
      ;; 
      
      -* | * )
        #Any other options -- ignore
	help_user
      ;;
           
    esac
  done
fi

#Process optional commands...
shift $(($OPTIND - 1))

#Start main procedure -- once all options processed.  
run_default
</PRE>

<P ALIGN="center">-----------------</P>

<P>For those of you who are completely new to BASH programming, please
refer back to Ben Okopnik's excellent tutorial earlier on in the LG series
(<A HREF="http://www.linuxgazette.com/issue52/okopnik2.html"
TARGET="_blank">issue52</A> onwards). For those experienced programmers, 
you'll notice that I have used the &quot;[ ..... ] && {} ||&quot; 
construct, rather than the more traditional &quot;if..then..else..fi&quot; 
method, since the former gives more control with exit status :-), and 
I prefer coding like this anyway. Perl also requires this syntax too :-)</P>

<P>The script in itself is quite simple. Basically what happens is that I
initialise all of my variables first. Now, BASH does not require this, but
I find it much easier to know what's going on if I do.</P>

<P>I set up various variables, most of which are just switch identifiers so
that I can tell whether or not any command-line switches (and which ones)
have been issued. I set up another variable <B>bname</B> which returns the
name of the program, with the PATH stripped, which I used in my
<I>help_user()</I> function.</P> 

<P>The other variable I defined is the <B>redir</B> variable. This is
initially set to whichever tty you invoke the script from, so that if you
did not specify the &quot;-q&quot; option, you will get messages to your
screen. I think I have been quite clever since, whenever a file/directory
is found, I issue a command thus:</P>

<PRE>echo "touching $lists/" >$redir</PRE>

<P>which, as I say is set to whatever tty you invoked it from.
(/dev/tty1)???. But, if you specified the &quot;-q&quot; flag $redir equals
&quot;/dev/null&quot; so that no messages appear</P>

<P>With regards to command-line switching, I have made good use of the
<B>getopts</B> command. Refer to <B>man 1 touchrec</B> for more information
on that.</P>
  
<P>I was so taken by this, that I even wrote a manual page :-).
Simply download the tar.gz file, untar it, and run
&quot;install.sh&quot;</P>

<P>For more information about how to use this script, please refer to
&quot;man touchrec&quot;. Hope you get good use out of it :-)</P>

<HR>

<!-- ============= -->
<!-- END: Touchrec -->
<!-- ============= --> 

<H2><A NAME="gnufind">GNU Find: Evaluating its effectiveness</A></H2>

<P>How many of you have been guilty of using <B>mc</B> (midnight
commander), hitting the key sequence
&quot;&lt;ALT&gt;&lt;SHIFT&gt;&lt;?&gt;&quot; before, and then filling out
that nice dialog box to find the file that you require?? Don't lie, we've
all done it <B>(Hi Ben :-))</B>. And why? All that dialog box is, is a front
end to the command <B>find(1)</B> anyway. This article will help try and
wean you off pretty command-line dialog boxes. While there is nothing wrong
with using <B>mc's</B> searching feature, it does not give you the full
benefit to do complex searches. GNU <B>find</B> is a very
powerful tool indeed.</P>

<H2>Finding one particular file</H2>

<P>The most common use of find, is knowing where a certain file is. Now,
usually, if it is a binary file, you would most likely either use the
commands <B>which</B> and <B>where</B> to find it :-), but what if you were
looking for that file called <B>etherh.c</B>? You'd issue the command:</P>

<PRE>
cd /
find / -name etherh.c -print 2>/dev/null
</PRE>

<P>Now don't panic :-) The syntax of the find command is thus:</P>

<PRE>find {/path/} [name_of_file/expression] [options...]</PRE>

<P>So, what the command does, is beginning at &quot;/&quot; (the root
directory of the partition), search for the file called <B>etherh.c</B>,
when it finds it, <B>-print</B> it to stdout (and in this case the
<I>2&gt;/dev/null</I> redirects any errors to oblivion. -- used here
because I am not user <B>root</B> I obviously have permission problems
looking at certain files from &quot/&quot; that I don't care to know
about!)</I>.</P>

<P>The <B>-name</B> flag above has more than just one use as shown here. It
is in fact a flag which allows you to pass shell metacharacters to the
filename that you are trying to look for, and we will discuss that in the
next section.</P>

<P>If you have your kernel sources installed, you should find that the
file, is at:</P>

<PRE>/usr/src/linux/drivers/acorn/net/etherh.c</PRE>

<H2>Finding filenames using shell metacharacters</H2>

<P>It is all very well, knowing the exact name of the file that you trying
to search for. That makes life easier. But what if you didn't know the
exact name of the file, what then?</P>

<P>Well, in that situation, you would obviously have to use wildcards, or
more specifically shell metacharacters. These are characters such as:</P>

<PRE>
*
?
[]
{} -- [ although these have their uses as we shall see later on ]
</PRE> 

<P>Quite simply then, we can try something like the following:</P>

<PRE>
find /usr/bin -name 'xa*' -print
</PRE>

<P>Which should return:</P> 

<PRE>
/usr/bin/xargs
</PRE>

<P>The sharp eyed among you will have noticed that I

<H2>Find involving actions</H2>

<P>You can also tell find to run a program on the file(s) that it finds
too. This is an extremely useful feature, and you will be surprised at just
how often you will have cause to use it.</P>

<P>Suppose you have a bunch of files, say in $HOME, and I wanted to look
for a regular expression in each of them, i.e. "#!/bin/bash". I can do the
following:</P>

<PRE>
find $HOME -name '*' -print -depth -exec egrep -n '#!/bin/bash' {} \;
</PRE>

<P>The syntax of the last part, may seem strange, but what is happening is
that the flag <PRE>-exec</PRE> accepts first the command, and then any
addition options (in this case, a regular expression), followed by two
brackets {} which when run, will be expanded to the current filename which
is returned by the find parameter (be it a regular expression or specific
filename -- in this case all files (*). The backslash (\;) terminates the
command.</P>

<P>Therefore, in short, the syntax is:

<PRE>
find -path -name {pattern/regex} -exec {name_of_program} [options] {} \;
</PRE>

<P>You can then apply this principle to use any command that you can see a
use for :-)</P>

<H2>Finding particular types</H2>

<P>Once again, find makes our life even easier, by allowing us to look for
specific file types. Now, while you might well think that you could use a
combination of <PRE>ls, test, find</PRE> to do the same thing, <B>don't
re-invent the wheel</B> :-). Here are some examples:</P>

<PRE>find / -name '*' -print -depth -type d</PRE>

<P>-- which prints only directories</P>

<PRE>find / -name '*' -print -depth -type f</PRE>

<P>-- which finds only files</P>

<PRE>find / -name '*' -print -depth -type l</PRE>

<P>-- finds symbolic links only</P>

<P>If you only want to search say, on the top-level directory, and not
traverse any lower, then you can use the:</P>

<PRE>-maxdepth {number}</PRE>

<P>switch. For example, if you only wanted to search for directories which
is in your $(pwd) -- (current working directory) you can do:</P>

<PRE>
find / -name '*' -type d -maxdepth 1 -print
</PRE>

<P>Which on my computer (laptop) returns the following:</P>

<PRE>
/
/lost+found
/boot
/proc
/var
/tmp
/etc
/sbin
/bin
/lib
/root
/usr
/cdrom
/floppy
/home
/mnt
/opt
/dev
/chess
/pavement
</PRE>

<P>The number indicates the number of subdirectories that you wish to
descend during your search.</P>

<P>But the fun doesn't stop just with this mini-article. <B>find</B> has a
whole host of other options many of which I cannot ever see the need
for, but that's only because I have a limited use for it.....</P>

<P>Definitely check out the command:</P>

<B>man find</B>

<HR> 

<!-- ========================== -->

<A NAME="intjf"><H2>Interview: John M. Fisk</H2></A>

<I>[ Yep! It is the same John Fisk that started off this magazine, and
thie Weekend Mechanic series. I was <B>really</B> pleased when John sent me an
e-mail out of the blue saying he had read my article :-) So, I post a
transcript of our conversation here -- Thomas Adam ]</I>

<BR><BR>

<I><FONT COLOR="blue"><B>[John]</B></FONT></I>: &nbsp; <PRE><B>Dear Thomas,

I want to say thanks for keeping up the "Weekend Mechanic" column in the 
LG.  I have to admit that I've had little time for pleasure reading (and 
much less for writing) these past several years.  On a whim, I started 
reading the latest LG (after seeing an announcement for it on the lwn.net 
site) and noticed the WM column was still there.  I'm absolutely delighted 
that you're keeping it going and wish you the very best.

Trust your end-of-semester exams go well.  Have a great summer 'linuxing.

cheers,

John

p.s., kudos for providing "install from source" instructions for squid.  I 
suppose that a growing number of users are simply dependent on rpm or deb 
binaries (and there are good reasons for using these) but I still tend to 
"roll my own" from source and make a package out of it when I'm not feeling 
so lazy :-)
</B></PRE>

<I>[Thomas]</I> &nbsp; 
<PRE>Hello. I must say that I feel *very* honoured to have
received an e-mail from you -- especially as you
founded the Linux Gazette :-) You have no idea just
how much I valued your efforts way back in 1996. Had
you any idea that the LG would be as popular as it is
now?
</PRE>

<I><B><FONT COLOR="blue">[John]</B></FONT></I>: &nbsp;
<PRE><B>
Absolutely not.  I started getting interested in Unix/Linux during the 
summer of 1994.  I had just switched from being a general surgery resident 
at a very busy tertiary care hospital to working as a research assistant in 
the lab of one of the hepatobiliary surgeons.  I managed to get a dial-up 
account on the universities VAX machine (2400 baud :-) and started using 
gopher.  Somehow, I ran across information on Linux and decided to give it 
a try since I was interested in doing a medical informatics fellowship.

It took countless days to download the installation floppy set from TAMU 
(Texas A&M Univ.).  I had a 2 MB limit on my shell account so I would ftp 
an image to the account and then turn around and transfer it to my local 
box via kermit.  TAMU was the first distribution I ever tried.  Almost 
immediately, I decided to give Slackware a try -- it was the "new kid on 
the block" and was supposed to be so much better than SLS.  That was 
August, 1994.

After playing with Linux for a year or so I decided that I wanted to learn 
how to write HTML and so the Linux Gazette was born out of similar 
"itches":  learning Linux and learning HTML.  I absolutely loved Linux, and 
do so to this day, so it was easy to come up with content.  I just wrote 
about the things I loved and found exciting.  I had no earthly notion that 
it would be that popular.  I had a good deal more time on my hands back 
then and so I was able to do almost everything -- write columns, coordinate 
inclusions by others, format the entire batch so that the HTML was at least 
reasonably "legal", etc.

About a year later (issue 8) I was in over my head and was now back in 
school full time working on a computer science degree (actually, I was a 
non-degree seeking graduate student, but I took the entire computer science 
curriculum and enough math courses for a math minor).  Phil Hughes from the 
Linux Journal got in touch with me.  He was interested in an online 
magazine of this type and offered to take over the administrative 
work.  So, I was terribly relieved to turn the reins over to him and 
continue writing.
</B></PRE>

<I>[Thomas]</I>: &nbsp;
<PRE>
I started reviving your article several months ago.
Although I started submitting articles once a
month, they have been more intermittent of late, due
to University work getting in the way :-(
</PRE>

<I><B><FONT COLOR="blue">[John]</B></FONT></I>: &nbsp;
<PRE><B>
Brother, I know that feeling... :-)
</B></PRE>

<I>[Thomas]:</I> &nbsp;
<PRE>
Incidentally, I hope you didn't mind me, re-using your
article name, and images. I had tried to get in
contact with you, to ask your permission, but it seems
that you don't mind :-)
</PRE>

<I><B><FONT COLOR="blue">[John]</B></FONT></I>: &nbsp;
<PRE><B>
Not in the least.  I'm absolutely delighted that you've done this and wish 
you the very best.
</B></PRE>

<I>[Thomas]:</I> &nbsp;
<PRE>
If time permits, you should start reading the LG. It
would be nice, if you could send an e-mail to the
editor :-) Just to say, hi. I'm sure that'll cause 
quite a stir.....especially with Jim Dennis :-) 
</PRE>

<I><B><FONT COLOR="blue">[John]</B></FONT></I>: &nbsp;
<PRE><B>
I'll do that.
</B></PRE>

<I>[Thomas]:</I> &nbsp;
<PRE>
What are you doing these days??? Your last ever
article said that you'd finished your degree
(congratulations) and was going to work for a medical
centre?? Is this still the case?? How is your wife??
</PRE>

<I><B><FONT COLOR="blue">[John]</B></FONT></I>: &nbsp;
<PRE><B>
At the moment, I'm within a couple years of finally finishing up my medical 
training!  I went on to do a brief medical informatics fellowship under 
Drs. Randolph Miller and William Stead at the Vanderbilt University Medical 
Center and then decided to finish my formal medical training in 
Pathology.  I matched at Yale (here in New Haven, Connecticut) and have 
completed 2 years of Anatomic Pathology training.  This year, I was able to 
take a year off to do some medical informatics research with Dr. Prakash 
Nadkarni.  We've just finished writing our first paper (in information 
retrieval) and I'm working on two additional projects.  I start back "on 
the wards" as a Clinical Pathology (AKA, Laboratory Medicine) resident on 
July 1.

Life has gotten a rather busy of late.  My wife and I adopted a little girl 
from China in August, 2000.  She's a cutie pie, but definitely takes a good 
deal of what little "free time" we had left :-).  Any more, I try to keep 
up with things in the Linux Community but I've had no time to write.

What distribution are you using?
</B></PRE>

<I>[Thomas]</I>: &nbsp;

<PRE>
I'm using SuSE 7.1, soon to switch back to using <B>Debian</B>
</PRE>

<I><B><FONT COLOR="blue">[John]</B></FONT></I>: &nbsp;
<PRE><B>
I'm still using Slackware :-).  You mentioned that you've been using Linux 
for around six years.  That's long enough that you've probably given a 
number of distributions a whirl.  I have to say that I really like 
Mandrake, and I've run Debian for short time.  Eventually, however, 
managing the *.deb's and *.rpm's becomes a headache and I start fighting 
with the package manager.  In time, I just get disgusted and go back to 
Slackware.  It's stable, Patrick V. does a nice job of keeping current 
without pushing too far toward the bleeding edge.  And I still compile 
nearly everything from scratch.
</B></PRE>

<I>[Thomas]</I>: &nbsp;
<PRE>
Thanks again John :-)
Keep in touch,
</PRE>

<I><B><FONT COLOR="blue">[John]</B></FONT></I>: &nbsp;
<PRE><B>
You too.  Best wishes,

John

-- 
John M. Fisk, M.D.
Postdoctoral Research Associate, The Yale Center for Medical Informatics
Yale University School of Medicine, 333 Cedar Street, PO Box 208009, New 
Haven, CT  06520-8009
email: John.Fisk@yale.edu
phone: (203) 764-8132
</B></PRE>
<!-- ========================== -->

<!-- =================== -->
<!-- BEGIN: closing time -->
<!-- =================== --> 

<HR>

<H2><A NAME="closet">Closing Time</A></H2>

<P></P>

<P>Oh well, until next month -- take care.</P>

<!-- ==================== -->
<!-- END: closet          -->
<!-- ==================== -->

<HR>

<!-- ** Begin table comments, etc. Oh wakey wakey you idiot Thomas ** -->
<TABLE width="60%" align=center border=0>
  <TBODY>
  <TR>
    <TH></TH>
    <TH></TH>
    <TH></TH>
  <TR>
    <TD width="10%"><IMG height=64 alt="" src="../gx/adam/mail.png" 
      width=64 align=left></TD>
    <TD align=middle width="80%"><FONT color=red size=5>Send Your 
      Comments</FONT></TD>
    <TD width="10%"><IMG height=64 alt="" src="../gx/adam/mail.png" 
      width=64 align=left></TD></TR></TBODY></TABLE>
<P align=center><FONT size=3>Any comments, suggestions, ideas, etc can be mailed 
to me by clicking the e-mail address link below:</FONT></P>
<P align=center><FONT size=3><A 
href="mailto:thomas_adam16@yahoo.com">mailto:thomas_adam16@yahoo.com</A></FONT></P>

<HR>




<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Thomas Adam</H4>
<EM>My name is Thomas Adam. I am 18, and am currently studying for A-Levels
(=university entrance exam). I live
on a small farm, in the county of Dorset in England. I am a massive Linux
enthusiast, and help with linux proxy issues while I am at school. I have been
using Linux now for about six years. When not using Linux, I play the piano,
and enjoy walking and cycling.</EM>


<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2002, Thomas Adam.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 81 of <i>Linux Gazette</i>, August 2002</H5>
<!-- *** END copyright *** -->

<!--startcut ==========================================================-->
<HR><P>
<CENTER>
<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="lg_bytes.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue81/adam.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom"  ></A><A HREF="../lg_faq.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="adam2.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom"  ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
</CENTER>
</BODY></HTML>
<!--endcut ============================================================-->