FILES - list pathnames of files or catalogs under a catalog.

Syntax:

files [ [option]* [pathname] ]*
 
+Access            +CReate
+Change            +SiZe
+Tape              +Usage
(+|-)CaTalog (-)   (+|-)Privileged (-)
(+|-)ReLative (-)  (+|-)Verbose (+)
(+|-)Warning (+)   Before=date
Levels=n           Mode=<Linked|Random|Sequential>
Omit=class         Passwords=<None|Mark|Show>
SeLect=class       Since=date
indeX=filename     SoRt=<Ascending|Descending|No>
                   Time=hour:minutes[:seconds]

Examples:

files
files sort=no
files +size /source
files since=12/jan/77 +a /fort /newstuff
files +sz /sample -v /expert
files select=null

Options:

+Access
sorts and selects names based on the access date. It also tells FILES to display the access date in the form "yymmdd" unless -Verbose is specified.
Before=date
selects files changed (or accessed) before the specified date. Files are sorted in date order, unless you specify Sort=No. You may specify the "date" in any of the forms shown in "expl b lib getdat".
+CaTalog
displays names of the subcatalogs instead of the files. If you specify +CaTalog, you may not specify date, mode, and other file specific options.
+Change
sorts and selects names based on the change date. It also tells FILES to display the change date and time in the form "yymmdd hh:mm" unless -Verbose is specified.
+CReate
sorts and selects names based on the creation date.
indeX=filename
specifies an index file. An index file is a text file containing the pathname of a file or catalog on each text line. These pathnames are treated as if they had appeared on the command line. For example, if your index file contains the names of a number of catalogs, FILES searches for files under each of those catalogs.
Levels=N
searches only N levels of catalogs. The default is to search all sub-levels.
Mode=Linked
Mode=Sequential
only selects sequential files. "Linked" is the same as "Sequential".
Mode=Random
only selects random files.
Omit=class
restricts the set of files or catalogs that FILES examines. The "class" argument may be any of the following keywords:
ReMoVable
ignores subcatalogs on removable devices.
Busy
ignores files with active busy counts.
NuLl
ignores files that have never been written.
ReStoreLocked
ignores files that are currently restore locked.
NonStruct
ignores any file where the non-structured file bit is set. This includes catalogued tapes, non-structured removable disks, and the special files used by the Automatic Storage Manager (ASM, also known as SMS).
Logical
ignores ASM logical files.
Migrated
ignores files that have been "transparently" migrated to tape by ASM. This migration is not always perfectly transparent to the user.
NonstructDisk
ignores non-structured removable disks.
Tape
ignores catalogued tapes.
Passwords=mode
controls how password display is handled for named and subordinate files and catalogues. The "mode" argument may be any of the following keywords:
None
does not show passwords for files and subordinate catalogs.
Mark
indicates the presence of a password with just a "$", but does not include its value.
Show
includes passwords in the output. This option requires LODS permission and the +Privilege option. In the case of time lock passwords, FILES tries to find the currently open password. If there is no current password open, FILES indicates this with just a "$".

Password= does NOT affect passwords for superior catalogs given on the command line, in an index file, or set in the working catalog. FILES will just display what was entered.

+Privileged
lets LODS users list any catalog. It also lets LODS users use Password=Show.
+ReLative
displays pathnames relative to the specified catalog instead of the full pathname. If you apply this to a file, the result is a null pathname.
SeLect=class
restricts the output to just the specified class of files. The "class" may be any of the keywords used for Omit= except ReMoVable.
Since=date
similar to Before= except that it selects files changed (or accessed) on or after the specified date.
+SiZe
displays the file size (in llinks). Files will also be sorted according to file size, unless you specify Sort=No.
Sort=Ascending
Sort=Descending
specifies the direction in which output should be sorted. The default is Ascending.
Sort=No
tells FILES not to sort output.
+Tape
displays the save tape on which each file is saved. Files will also be sorted according to save tape unless you specify Sort=No.
Time=hour:minutes[:seconds]
only displays those files that have been changed as of the given time. The time must be given as "hour:minutes" (e.g. t=09:30), or "hour:minutes:seconds" (e.g. 09:30:21). If you specify Time=, you must also specify one of Before= or Since=. Time= cannot be used with +Access or +CReate because the file system does not keep this information.
+Usage
displays the file access count. Files will also be sorted according to access count unless you specify Sort=No.
-Verbose
does not display the date if you specify +Access, +Change, or +CReate.
-Warning
does not display certain information messages to the terminal. For example, FILES won't tell you when a catalog is empty.

Description:

The FILES command provides a quick method of listing the names of files under any catalog for which you have execute permission. If you do not specify a catalog name, FILES uses your current catalog.

Options and catalog names can be given anywhere on the command line. FILES collects all the options before it starts searching catalogs, and if options conflict with each other (e.g. +Access and +Change), FILES just exits with a diagnostic message.

FILES is particularly useful in conjunction with a command processor like EO, or for building command files.

FILES may be applied to a file as well as a catalog, and hence may be used to test the change date, etc. of a file.

If you specify a sorting option and more than one catalog name, FILES sorts file names within each specified catalog but does not merge the catalogs together. For example, if you say

files +access /a /b sort=desc
FILES displays the files in "/a" sorted in order of most recent access, followed by the files in "/b" in a similar order. You do not get the entire list of files sorted together.

FILES does its sorting in memory; with very large file lists, FILES may abort because it runs out of memory. In this situations, specify Sort=No, then use the BSORT command to sort the files.

Copyright © 2000, Thinkage Ltd.