rh enhancements description
Scott Blachowicz
scott at grlab.UUCP
Thu May 11 05:26:33 AEST 1989
Hi-
I too have made some enhancements/bug fixes to the rh program. I use
it for my file system snooping scripts to find disc space hogs/security
problems and general straightening. It's really nice to have all of the
expressions as macros in a file. At any rate, my question is, "should I
post the changes to the net or mail them to the author?" I haven't
located a context diff program on our system yet, and I don't know how
to use the man page macros (for updating the man page), yet...it needs a
little work before I could post it.
Among the changes are the following:
-Added option to force following of symbolic links instead of just
reporting info on the link itself.
-Merged in the '-p' option from the sls program recently posted to the
net.
-Added some stuff for HP-UX support (Remote File Access network
special files).
-Added some convenience functions (isblk ischr isdir isreg islnk
issock isnwk). For example, isblk is equivalent to
((mode & S_IFMT) == S_IFBLK).
-Added $$groupname to evaluate to the group id number of the name.
(parallels the $username = uid of name).
-Added some time formats:
[yyyy/mm/dd], [yy/mm/dd], [yy/mm/dd.HH:MM], [yyyy/mm/dd.HH:MM],
[yymmdd], [yymmdd.HHMM] (I use the latter formats frequently. The
editor on the HP1000 will time stamp your file for you if you have
a string that looks like <yymmdd.HHMM>, so I got used to that
format).
-Added a way to have filename matching based on the whole path. This
is done by starting the pattern with a '^'. (e.g. "^/usr/lib/*").
-Incorporated the first pattern matching patch posted by
cudcv at warwick.ac.uk (Rob McMahon). This allows patterns such as
"a?[b-y]\*\"z*".
-I'd also fixed the parsing problem with ungetit'ing the last
character in an expression string before Rob's posting, so that's
there, too.
-Added a couple of operators to deal with directories. One will
"prune" the directory if its unary operand is true. The other will
cause all of the files within a directory's subtree to "match".
Some things I'd like to do(our find(1) does all of these...ideas on how
I could do them would be appreciated):
-Something to prevent mount point crossing.
-fstype variable (local,nfs,???)
-HP has files called "Context Dependent Files" (or CDFs) that are
really hidden directories whose contents are selected based on the
"context" of the system trying to access the file. (e.g. the kernal
is referenced as "/hp-ux" but there is actually a hidden directory
called "/hp-ux+" that contains kernals for the different nodes in the
network that boot from that file system). At any rate, readdir
resolves these, but I want to find a way to see the hidden
directories.
--
Scott Blachowicz
USPS: Graphicus UUCP: ...!hpubvwa!grlab!scott
150 Lake Str S, #206 VoicePh: 206/828-4691
Kirkland, WA 98033 FAX: 206/828-4236
More information about the Comp.sources.bugs
mailing list