FINDxxx Copyright (c) 1994 Allegro Consultants, Inc. Author: Stan Sieler (sieler@gmail.com) This program searches for files that are interesting. A file can be interesting because it is more than some number of days old, or younger than some number of days, or has a date that is in the future, or has a creator from another account. The actual default for what is interesting depends upon the name of the program. Program name: Default action: FINDACD Look for files with ACD security. FINDBADC Look for files with a bad creator. FINDBIG Look for files of 2 or more MB. FINDFILE Look for any files. FINDHFS Look for any HFS files (non-MPE names). FINDNEW Look for files modified today (or later). FINDOLD Look for files allocated/restored more than 1 day ago ("OLD" files) Five kinds of dates are known: allocation date ... the date the file was created or RESTOREd. creation date ... the date the file was created. modification date... the date the file was last modified. access date ... the date the file was last accessed. state_change date... the date the file's state was last changed (e.g, by a chmod command) The FINDOLD program defaults to using the allocation date. The FINDNEW program defaults to using the modification date. The FINDBADC program defaults to ignoring all dates, and looking at a file's creator. The FINDFILE program can be configured (via options) to act like any of the FINDxxx programs, or it can be used in a more general manner (see -NEWEST and -OLDEST). For the rest of this help text, FINDxxx will refer to the general program, regardless of what name it is running under. NOTE: not all options below have comments. That's often an indication that they're for internal R&D testing. Options are specified via the INFO parameter: -ACCessed Tells FINDxxx to use the access date for comparisons. -ACD Tells FINDxxx to report files that have ACDs. The output report column "ACD" shows the ACD "version" number (a blank means no ACDs). The current version for new ACDs is 6 (as of MPE/iX 6.5). -ALLOCation Tells FINDxxx to use the allocation date for comparisons. Use the allocation date for comparisons Note: creating a file and RESTORING a file both set the allocation date. -ANYdates or -@ Tells FINDxxx to check against any date, not just a single date. -[no]ASCII ASCII fells FINDxxx to look only for ASCII files. This causes BINARY files to be rejected. NOASCII tells FINDxxx not to check for ASCII/BINARY. -BACKUP BACKUP rejects all files that do have the NO_BACKUP bit on. -NOBACKUP NOBACKUP rejects all files that do not have the NO_BACKUP bit on. -[no]BADCREATOR Tells FINDxxx to look for files whose creator is not in the same account (a possible problem as of MPE/iX 4.5). Note: if no other "date" oriented option is given, then a -NODATES is assumed. Note: see also -[no]MGRSYSok Note: this utility does not have the ability to "fix" the bad creator. MPEX's ALTFILE should be able to do so. Default: -BADCREATOR for FINDBADC, otherwise -NOBADCREATOR -[no]BINary BINARY fells FINDxxx to look only for BINARY files. This causes ASCII files to be rejected. NOBINARY tells FINDxxx not to check for ASCII/BINARY. -[no]BREAK BREAK tells FINDxxx to emit a 'break' in the output when the group or account changes from one file to the next. -[no]BYTESTREAM BYTESTREAM tells FINDxxx to only look at bytestream files. NOBYTESTREAM tells FINDxxx to only look at non-bytestream files. If neither is specified, FINDxxx will not care if a file is bytestream or not. -[no]CHECKFlab -CMD MPEcommand or -MPE MPEcommand Tells FINDxxx to invoke the specified MPE command for every interesting file. The command is called by building a string consisting of: . For example, if you wanted to purge every file that has a bad creator, you could do: run FINDxxx;info="@ -badcreator -cmd purge" The CM versions of FINDxxx uses the COMMAND intrinsic. The NM versions of FINDxxx use the HPCICOMMAND intrinsic. -COMPressed Tells us to only look for files marked as Compressed. -CREation (or: -CREATED or: -CDATE) Tells FINDxxx to use the creation date for comparisons. -DATEFormat <0 | 1 | 2 | 3 | 4> Specifies the format that dates should be displayed in. Format values are: 0 : mm/dd/yy 1 : 05 sep83 2 : yymmdd 3 : dd mm yy 4 : yy/mm/dd -[no]DATES DATES tells FINDxxx that it should look at file dates. NODATES tells FINDxxx that it should ignore all file dates. This is generally done in conjunction with a -BADCREATOR. Default: -NODATES for FINDBADC, otherwise -DATES. -Days #days (# days in the past) Tells FINDxxx how many days in the past (or future) a file's date(s) can be. For example, to find all files modified since yesterday, a DAYS -1 could be used. Note: ### or -### implies the number of days in the past. +### implies the number of days in the future. -DELACD Tells FINDxxx to search for files with ACDs, and to try to delete the ACDs. Note: files with no security setting, and/or with a creator outside the file's account cannot have their ACD's removed. -EMPTY Tells FINDxxx to only select files with EOF of 0. -F... or ... Specifies a fileset to look for. Note: the -F is optional. Only one fileset may be specified per run. If a fileset is not specified, either @, @.@, or @.@.@ will be used (@.@.@ if you are SM, @.@ if you are AM). -FILECode # Specifies a filecode to look for. Only files with that filecode will be looked at. -[no]FILEFLAGS FILEFLAGS rejects any files that do not have "interesting" bits turned on in the FILE_FLAGS field of the file label (type "flab_t"). -fileSIZE # or: -MBs # Tells FINDxxx to look for files larger than the specified number of MegaBytes (default for FINDBIG: 1MB) -FILESIZE (or -SIZE) without a number of MBs will tell FINDOLD to report the size of the files (providing they're at least 1 MB or so) -[no]FINDFL FINDFL forces us to lookup the filelabel virtual address for each file. It also adds a column to the output, showing which files have file_flags bits on for: no_backup, protected, purge_pending, restore, store and priv_level < 3 -[no]FLab or -[no]FILELABel FLAB says you want to see the virtual address of the file label for all selected files. -FUTURE Tells FINDxxx to look for files with any dates in the future (all five types of dates are examined). Also does implicit -SHOWDATE -HELP Displays help information and then terminates. -HSM Tells us to only look for files marked as Compressed or as Migrated. -IGNSYMLINK Tells us not to care if a file is a symbolic link or not. (See also: SYMLINK) -INVERT INVERT tells FINDxxx to "invert" the logic for choosing a file. Example: -FILECODE 111 would look only at QEDIT files. -FILECODE 111 -INVERT would look at all files other than QEDIT files. -[no]KSAM If specified, KSAM says we only want KSAM/V or KSAM XL data or key files. If specified, -NOKSAM says we don't want any KSAM/V or KSAM XL data or key files. -[no]KSAMV If specified, KSAMV says we only want KSAM/V data and key files. If specified, -NOKSAMV says we don't want any KSAM/V data or key files. -[no]KSAMVD If specified, KSAMVD says we only want KSAM/V data files. If specified, -NOKSAMVD says we don't want any KSAM/V data files. -[no]KSAMVK If specified, KSAMVK says we only want KSAM/V key files. If specified, -NOKSAMVK says we don't want any KSAM/V key files. -[no]KSAMXL If specified, KSAMXL says we only want KSAM XL data and key files. If specified, -NOKSAMXL says we don't want any KSAM XL data or key files. -LDEV # [/#] LDEV tells FINDxxx to only look at files whose label is on the specified ldev (or in the specified ldev range). Note: multiple -LDEV commands can be used. -LDEV 1 -LDEV 3 will look at files on ldev 1 *or* 3. -[no]LOCKword [xxx[@]] -NOLOCKWORD means don't check to see if a file has a lockword. -LOCKWORD xxx means check that the lockword is xxx -LOCKWORD - means check that the file has NO lockword -LOCKWORD xxx@ means check that the lockword starts with xxx -LOCKWORD @ means check that the file has SOME lockword -MAXPARTs # -MIGRated Tells us to only look for files marked as Migrated. -MINPARTs # -[no]MPEONLY -[no]MPEonly MPEONLY tells FINDxxx to only look at MPE named files, not files that are in the Posix-only name space. NOMPEONLY tells FINDxxx that it can also look at HFS files. Default: -NOMPEONLY -[no]MGRSYSok MGRSYSOK tells FINDxxx that MANAGER.SYS is always an acceptable file creator for -BADCREATOR. NOMGRSYSOK tells FINDxxx that MANAGER.SYS is not automatically an acceptable file creator for -BADCREATOR. Default: -NOMGRSYSok. -MODification (or: -MODIFIED or: -MDATE) Tells FINDxxx to use the modification date for comparisons. -NEITHER Obscure option which is partially the same as saying both -NEW and -OLD. In fact, I can't recall the semantics. -[no]NEW Tells FINDxxx to look for files newer than the specified date(s). This is the default for FINDNEW. NONEW is the same as OLD. -NEWEST Tells FINDFILE (not FINDxxx) to list the file with the newest dates: access, creation, modification, restore/allocation, and state change. If more than one file has the newest of a particular date, only the first filename is listed. May be used with -OLDEST Also produces a table showing the age breakdown of the files found. -NUMEXTents # Only select files with at least # extents. -[no]OLD OLD tells FINDxxx to look for files older than the specified date(s). This is the default for FINDOLD. NOOLD is the same as NEW. -OLDEST Tells FINDFILE (not FINDxxx) to list the file with the oldest dates: access, creation, modification, restore/allocation, and state change. If more than one file has the newest of a particular date, only the first filename is listed. May be used with -NEWEST Also produces a table showing the age breakdown of the files found. -[no]PARTPROGRESS PARTPROGRESS tells FINDxxx to display progress messages once every 100 files. It is a "partial" form of PROGRESS. Setting this flag implicitly does a NOPROGRESS. NOPARTPROGRESS disables PARTPROGRESS, but doesn't affect the setting of PROGRESS/NOPROGRESS. Default: -NOPARTPROGRESS -[no]POSIX NOPOSIX tells FINDxxx to avoid looking in the HFS (Posix) directory, and to stay in the MPE name space. This affects the default fileset used by FINDxxx if you didn't specify one. (Naturally, this defaults to -NOPOSIX prior to MPE/iX 4.5) POSIX tells FINDxxx that it is ok to look in the HFS name space. -PRIV Select only files with negative filecodes -PRIVLEVEL # PRIVLEVEL rejects all files whose PRIV_LEVEL is GREATER than #. Thus, PRIVLEVEL 2 would find all files with PRIV_LEVEL 0, 1, or 2. -[no]PROGRESS PROGRESS tells FINDxxx to display the progress messages for interactive users. The progress message is a quick display of each file name as it is encountered. If the file is not interesting, it is quickly erased from the screen. NOPROGRESS tells FINDxxx to suppress the progress messages it normally generates for interactive users. The progress message is a quick display of each file name as it is encountered. If the file is not interesting, it is quickly erased from the screen. Default: -PROGRESS for interactive, -NOPROGRESS for batch. -[no]PROTECTED PROTECTED rejects all files that are not marked PROTECTED. -[no]PURGE PURGE tells FINDxxx to purge all selected files. NOTE: no confirmation is done, the file(s) is(are) purged! -[no]PURGEPENDING PURGEPENDING rejects all files that are not marked PURGE_PENDING. -[no]QEDIFY QEDIFY selects only ASCII files, and emits their name with the word "QEDIFY" in front. If you have a QEDIFY UDC or command file, this can be used to generate commands to convert ASCII files to QEDIT format. -[no]QEDIT QEDIT selects only QEDIT files (filecode 111) -[no]QEDITOK QEDITOK allows QEDIT files to match -ASCII -[no]Quiet QUIET tells FINDxxx to suppress the initial report and trailing summary. NOQUIET allows FINDxxx to display an initial report and trailing summary. -NOROOT -[no]SHOWBAD SHOWBAD reports files that "vanish" (e.g., are purged) or that are bad symbolic links (e.g., link to a file that doesn't exist). Default: NOSHOWBAD -[no]SHOWDate SHOWDATE tells FINDxxx to report the date used in deciding that a file was interesting. This adds an extra column to the report output. NOSHOWDATE tells FINDxxx to not report the date used in deciding that a file was interesting. Default: -NOSHOWDATE -[no]SHOWDATES SHOWDATES tells FINDxxx to report all dates for interesting files (on a separate line of output). Default: -NOSHOWDATES -[no]SHOWFCode -[no]SHOWFilecode -[no]SHOWLOCK -SKIPROOT STORE has a bug (or design flaw) wherein it updates the access and modification times of every IMAGE root file it stores. This, unfortunately, can make a root file look like it as accessed/modified as recently as the last time it was backed up (e.g., during a full backup). SKIPROOT, usually used with FINDNEW, causes IMAGE root files to be skipped. -SORTed Tells FINDxxx to sort the output by some criteria (depends upon how FINDxxx is being run. See SORTSIZE for a possibly more useful option. NOTE: probably not useful for other modes of running FINDxxx other than FINDBIG. -[no]SORTSIZE Causes output to be sorted in order of decreasing file size. -[no]SOURCE SOURCE selects ASCII and QEDIT files -STATE Tells FINDxxx to use the state_change date for comparisons. The state_change date is new on MPE/iX 5.0. -[NO]STATus STATUS tells FINDxxx to report some extra information (implies -TIMES), mostly when reporting bad dates. Default: -NOSTATUS -STORETIME Tells FINDxxx to estimate the amount of time it would take to store the matching fileds, and report it. See also: -TAPEDEVICE If -tapedevice is not specified, DDS1 is assumed (slow!). -STORING Tells FINDxxx to only look at files that are marked as "in use by STORE". -[no]SYMLINK SYMLINK tells FINDxxx to select only files that are symbolic links. NOSYMLINK tells FINDxxx to select only files that are not symbolic links. Default: -NOSYMLINK -[no]SYSMASTER SYSMASTER tells FINDxxx to only select files that are on ldev 1 and are marked as **$SYSTEM_MASTER files. NOSYSMASTER tells FINDxxx to only select files that are on ldev 1 and are *not* marked as **$SYSTEM_MASTER files. (**$SYSTEM_MASTER is a concept introduced on MPE/iX 7.5) Default: (not used) -TAPEDEVICE xxx Tells FINDxxx to assume a STORE is going to device xxx (E.g., DDS3, LTO1, DLT), and report the estimated amount of time a STORE would take for the selected files. Implies -STORETIME -TIMES TIMES tells FINDxxx to report the total CPU & elapsed time when done. NOTIMES tells FINDxxx not to report the CPU and elapsed times. Default: -NOTIMES -[no]Verbose -VERSIONS Reports some version information for the program, then terminates. -[no]XM -[no]Xonly (or: -HFSonly) XONLY tells FINDxxx to only look at Posix named files, not files that are in the MPE-only name space. NOXONLY tells FINDxxx that it can also look at non-HFS files. Default: -NOXONLY -YEARS # -Z # (internal debugging use) -[no]ZEROMGR ZEROMGR tells FINDxxx that a file creator of "0" should be treated as if it were "MANAGER.SYS". Some common HFS directories typically have "0" as a creator (e.g.: /etc). NOZEROMGR tells FINDxxx that a file creator of "0" is not the same as "MANAGER.SYS". Default: -ZEROMGR // Version: 20240127