Generated from C.60.01 /SYS/PUB/CICAT last modified on Thu Jan 11 09:18:52 2001
Lists file and directory attributes through the use of 13 options. The main differences between LISTFILE and LISTF are: 1) LISTFILE accepts HFS syntax for filenames, but LISTF accepts only MPE syntax. 2) LISTFILE supports selection equations and other filtering parameters not available via LISTF. 3) LISTFILE is able to display information for TEMP files, whereas LISTF only processes permanent files.
LISTFILE [fileset[,fileset[,...]]] [[;FORMAT=]format_opt] [[;SELEQ=]select_eq indir] [[;NAME=] pattern] [;PASS] [;{PERM}{TEMP}{PERMTEMP}] [;USENAME][;TREE][;NOTREE]
fileset The set of files you want listed. The default for fileset is @, meaning all MPE-named files in your current working directory (CWD). If fileset includes more than one file, be sure to separate the file names with commas and enclose the set in parentheses, for example: :listfile (test1,test2,test3) The files named in the fileset parameter can be either in MPE or HFS syntax (explained below). The file names dot (.) and dot-dot (..) have special meaning, that is, current directory and the parent of the current directory, respectively. Using Wildcards You may use the @, ? and # characters as wildcards in any position in the file name. You may use the - character as a wildcard in any position except as the first character of the file name. These wildcards have the following meaning: @ matches 0 or more characters ? matches any single character # matches a single digit [ ] matches one character specified between the brackets. If used within brackets ([ ]), the hyphen hyphen (-) means a range of characters. For example, "[c - g]" means all the characters between c and g inclusive. The character on the left must alphabetically precede the character on the right. - If used immediately after the left bracket ([), or just before the right bracket (]), hyphen (-) means the character '-' itself. For example, "[a-c]" means one of 'a', 'b', or 'c', whereas "[-a-c]" or "[a-c-]" means one of 'a', 'b', 'c', or '-'. It is illegal to specify [c-a], or [a-A] since 'c' does not alphabetically precede 'a' and uppercase 'A' comes before lowercase 'a' (in ASCII character evaluation). Also, it is legal to specify [A-z] and any legal special characters. MPE Syntax If fileset does not begin with the dot or slash (indicating HFS syntax), it is parsed according to MPE syntax and has the following form: filename[.groupname[.accountname] ] A LISTFILE command using MPE syntax does not display files that do not follow the traditional MPE naming conventions of up to eight character names for files, groups and accounts. If the fileset parameter does not specify groupname, all MPE-syntax files in the CWD are listed irrespective of whether the CWD is an MPE group or not. For example: "LISTFILE @" lists MPE-named files in the CWD; whereas, "LISTFILE @.@" lists all MPE-named files in all groups in logon account -- independent of the CWD location. If the CWD is not an MPE group, the information about the file is displayed in the new format as discussed below. You may have an MPE group that also contains files with HFS syntax, for example, they are lowercase, have long names, or contain special characters. To see both MPE and HFS files in a group, type, LISTFILE ./@ HFS Syntax If the fileset begins with a dot (.) or a slash (/), it is assumed to be in HFS syntax. The characters composing the name may be selected from the following set: a-z A-Z 0 1 2 3 4 5 6 7 8 9 - _ . $ % * + : ^ ` { | } ~ If the fileset parameter begins with a slash (/), the pathname is assumed to be an absolute pathname; otherwise, begins with a dot and is a relative (to the CWD) name. If fileset ends in a slash, it is treated as a directory name, and pattern is used to determine the file names that match. All the directories and files that match fileset are found and searched recursively to display the files and directories that match pattern. For example, if fileset is /SYS/@/, all files and subdirectories within SYS, and all files and directories within those subdirectories are displayed. The default for pattern is @. If fileset does not end in a slash, all files that match fileset are displayed. For example, if fileset is "/SYS/@", you will see a list of all, files, subdirectories and groups in the SYS account (directory), but not any files or subdirectories underneath SYS. If you have specified TREE, a trailing slash is assumed at the end of the fileset. For example, the command "LISTFILE /SYS/@;TREE" behaves like "LISTFILE /SYS/@/". On the other hand, if you specify NOTREE, the trailing slash, if present at the end of a fileset, is ignored. Hence, the command "LISTFILE /SYS/@/;NOTREE" behaves like "LISTFILE /SYS/@". format_opt A format selection. This parameter has no effect on the files selected for display, but affects the information about the files that you see. If fileset begins with a dot (.) or slash (/), or if the CWD is different from your current MPE group, or if you specify the ;TREE option, then you will see the HFS output style. This, in part, means: o Account, group, and directory names will end in a slash (/). o File names will appear at the end of the output lines. o Output begins in column two so that you can more easily detect filename wraparound from the previous line (which, if wrapping occurs, will begin in column one). The following table displays the format options available. Format Options --------------------------------------------------------------------- Option Name Displayed Information --------------------------------------------------------------------- -2 ACD Displays the file's ACD (access control definition). System Managers can view the ACD for any file. Account Managers can view the ACD for files in that account. File creators can view the ACD for their files. Other users can view an ACD only if that ACD specifies that the user has RACD (read ACD) access. For each directory, it displays PATH=absolute directory name ending in a slash. Next, for each HFS file within the directory, it displays the same information as MPE, except that it displays the file name (at most 255 characters) at the end of all other information. -1 LABEL Shows only the file label in hexadecimal. 0 FILES For each file, shows the name of the file in a multicolumn format. This is the default. 1 SUMMARY Displays the file name, file code, record size, record format, and other file characteristics such as ASCII or binary records, carriage- control option, file type, current end-of-file location, and the maximum number of records allowed in the file. 2 DISC Displays the file name, file code, record size, file type, current end-of-file location, and the maximum number of records allowed in the file. It also displays the blocking factor, number of sectors in use, number of extents currently allocated, and the maximum number of extents allowed. 3,-3 DETAIL;PASS DETAIL Displays the file name, record size, extent size, number of records, access rights for the user, and other file characteristics including the date created, modified, and last accessed. The same information for MPE and HFS files is displayed except for the following differences: o Fully qualified MPE file name is replaced by an absolute pathname. o Creator field displays the fully qualified user ID (user.acct) of the file owner. o The SECURITY field contains an additional field SAVE for MPE group entries. It is blank for entries other than MPE groups. All file access matrix fields are blank for anything other than MPE account, MPE group, and a file in an MPE group. o The LOCKWORD field is omitted. The creator, group id, and label address are omitted in FORMAT=3. These can be obtained by specifying -3 if you have sufficient capability (AM or SM). 4 SECURITY Displays the security matrix for the file. This includes account, group and file-level security, and the access rights for the user. For MPE groups and accounts, the security matrix for group, account, and account-only are displayed. The rest of the fields of the file access matrix are blank. For HFS directories, and files within HFS directories, all the fields of the file access matrix are blank. In addition, LISTFILE displays the message "ACD EXISTS". 5 DATA;PASS -5 DATA Shows LISTFILE,3 data and all file-specific data in LISTFILE, 3 type format (that is, KSAM and SPOOL). If the file has no unique data, only the option 3 data is shown. 6 QUALIFY Shows the fully qualified (absolute pathname) of the file. 7 UNIQUE Shows all file specific data in LISTFILE,5 type format, but does not show LISTFILE,3 data. If the file has no unique data, only the file name is displayed. 8 ACCESS Shows all accessors for the listed file. 9 LOCKS Shows all format 8 data plus more details about the processes accessing the file, including locking data. select_eq A selection equation, used as a filter on fileset. From the set of files matching the fileset, only files that match the select_eq requirements are listed. You may select on file types by using the FTYPE option, or you may select on object type by using the OBJECT option. Selection equations have the following format: [FTYPE = KSAMXL|SPOOL] [OBJECT = ACCT|GROUP|FILE|DIR|HFSDIR|SYMLINK] [CODE = filecode mnemonic|number|PRIV] [ACCESS = INUSE|OPEN|LOCK[ed]|EXCL[usive]] You must enclose selection equations in square brackets, for example: LISTFILE ./@ ;SELEQ=[OBJECT=DIR] You can also use your text editor to make a file that contains the OBJECT or FTYPE statement, for example [OBJECT=DIR], and save it with a filename. Thereafter, you can select this file by entering: LISTFILE ./@ ;SELEQ=^FILENAME The OBJECT option applies to all files, and may have any one of the following values. ACCT Lists only the MPE ACCOUNT directory. The synonyms are ACCTS, ACCOUNT, and ACCTS. GROUP Lists only the MPE GROUP directory. The synonym is GROUPS. FILE Lists only the files and not directories, groups and accounts. The synonym is FILES. DIR Lists only directories including groups/accounts and the system root directory /. Synonyms are DIRS, DIRECTORY, and DIRECTORIES. HFSDIR Lists only directories other than root, accounts, and groups SYMLINK Lists only symbolic links. mnemonic Selects files based on the file code mnemonic. number Selects file based on the file code number negative and positive values supported. PRIV Selects files that have a negative file code. INUSE Selects files that are accessed in any way OPEN Selects files that have been formally opened via a supported language or an intrinsic call. LOCK[ed] Selects files that have one of three semaphores locked. The accessor may own the semaphore exclusively, shared or be waiting. The three semaphores considered are: FLOCK, OPEN, and the GUFD. EXCL Selects only files opened for exclusive access. pattern When POSIX syntax is used in the fileset, pattern is exactly the same as the filename components of fileset as previously described. The name parameter applies only to HFS syntax. The LISTFILE command displays only those file names that match pattern. For example, the following displays all the files/groups/directories under the SYS account that start with OFF, off, Off, and so on. LISTFILE /SYS/;NAME=OFF@ If pattern is specified within single or double quotes, it is case sensitive. For example, the following command displays all the files/groups/directories under the SYS account that start with OFF. It will not display names that start with off, Off, and so on. The default for the pattern parameter is @; that is, it matches all names without regard to case. LISTFILE /SYS/;NAME=`OFF@' You cannot use the NAME parameter for an MPE fileset because the pattern can be specified as the part of the fileset. For example, instead of entering "LISTFILE @.@.@;NAME=@DOC" you should enter "LISTFILE @DOC.@.@". PASS Use this option to display sensitive data. Using it depends on your access rights to the data; that is, if you are the owner or if you have AM or SM capability. PERM Use this option to display permanent files only. PERM is the default. TEMP Use this option to display temporary files. You can only use TEMP with MPE-syntax files, not HFS files. PERMTEMP Use this option to display both permanent and temporary files. The permanent files are listed before the temporary files. USENAME The USENAME option applies only to HFS-named filesets. Use this option to tell ``LISTFILE'' to use the name to determine how many levels to display. If the fileset ends in a slash (/), then all files at all levels below the target file are displayed. If the name does not end in a slash (/), then only the objects at the specified level are displayed. For example, you would enter /@/@/@ to display all objects at the third level. USENAME is the default. TREE Use this option to display objects at all lower directory levels. NOTREE Use this option to display only objects at the specified level. The NOTREE option overrides an HFS fileset that ends in a slash.
You can use LISTFILE to list descriptions of one or more disk files at the level of detail you select. You must have traverse directory entries (TD) and/or read directory entries (RD) access for the directories in the pathname of the files that will be displayed by LISTFILE. (Refer to the ALTSEC command for further information on directory permissions.) For example, if the fileset is /dir1/dir@/@, you must have TD access for the root directory (/) and dir1. Also, you must have RD access for dir1 since the next name is wildcarded (dir@) and have RD access to each directory within the path specified by /dir1/dir@ since the next (and final) name is a wildcard (@). For format options -1, -2, -3, and -5, you must have either SM or AM capability for the file. A file description is not listed unless the file's home volume set (PV) is mounted. This command may be issued from a session, a job, a program, or in break mode. Pressing [[Break]] aborts execution. If the fileset is in MPE syntax, LISTFILE only displays file names that follow MPE naming syntax. For example, LISTFILE @,2 will not display the file am_pm, whereas LISTFILE ./@,2 will display the file. If fileset ends in a slash (/) or the ;TREE option is specified, then the contents of every matching directory will be displayed recursively. To see just a directory name, but not all the files under it, use the ;NOTREE option or omit the trailing slash.
LISTFILE @
FILE1 FILE2 FILE3 etc. LISTFILE @.pub.office,2 ACCOUNT= OFFICE GROUP= PUB FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE---- SIZE TYP EOF LIMIT R/B SECTORS #X MX F4 80B FA 411 411 16 144 2 * F5 80B FA 199 199 16 64 1 * LISTFILE hppxudc.pub.sys,8 ******************** FILE: HPPXUDC.PUB.SYS 15 Accessors(O:15,P:15,L:0,W:0,R:15),Share #S265 MIKEP.HPE P:2,L:0,W:0,R:2 LDEV: 49 #S263 JEFFV,MGR.JVNM P:3,L:0,W:0,R:3 LDEV: 47 #S261 KROGERS.MPENT P:2,L:0,W:0,R:2 LDEV: 50 #S231 SUSANC.MPENT P:2,L:0,W:0,R:2 LDEV: 46 #S219 FAIRCHLD.MPENT P:2,L:0,W:0,R:2 LDEV: 39 #S214 CATHY,MGR.BOSS P:2,L:0,W:0,R:2 REM : 15.14.16.198 #J434 FTPMON,FTP.SYS P:2,L:0,W:0,R:2 SPID: #O21905 LISTFILE hppxudc.pub.sys,9 ******************** FILE: HPPXUDC.PUB.SYS 5 Accessors(O:5,P:5,L:5,W:0,R:5),Share #S263 JEFFV,MGR.JVNM P:3,L:3,W:0,R:3 LDEV: 47 #P147 (LFCI.PUB.SYS) ACCESS: R-excl REC#: 0 FNUM: 13 LOCKS--Owner-- --Waiter-- FLOCK OPEN #P154 (CI.PUB.SYS) ACCESS: R-excl REC#: 0 FNUM: 13 LOCKS: none #P86 (JSMAIN.PUB.SYS) ACCESS: R-excl REC#: 336 FNUM: 16 LOCKS--Owner-- --Waiter-- FLOCK #J434 FTPMON,FTP.SYS P:2,L:2,W:0,R:2 SPID: #O21905 #P79 (CI.PUB.SYS) ACCESS: R-excl REC#: 0 FNUM: 14 LOCKS: none #P47 (JSMAIN.PUB.SYS) ACCESS: R-excl REC#: 336 FNUM: 15 LOCKS--Owner-- --Waiter-- OPEN FLOCK HFS Examples The sample file system below illustrates a hierarchical directory structure. In this figure, directory names are shown as the character d plus a number (for example, d0), and file names are shown as the character f plus a number (for example, f1). The examples followingassume the directory structure shown. They also assume that the current working directory (CWD) is /ACCT/GROUP/d0. Sample File System /ACCT/GROUP/d0 = CWD | -----------------------------------|--------------------------------- | | | | | | d1 d2 d3 f1 f2 f3 | | --------------|--------------- ----|-------------- | | | | | | | | | | | d4 f4 f5 d5 d6 f6 d7 f7 f8 f9 f10 | | | | ---|-- ---| -----|---- --|----------------------- | | | | | | | | | | | | f11 f12 d8 f13 f14 f15 d9 f16 f17 f18 f19 f20 In this first example, the user sets the HPPROMPT variable to show the current working directory, changes directories using the CHDIR command, and requests a listing of all files one level below the CWD. hello manager.acct,group setvar hpprompt "!!hpcwd:" /ACCT/GROUP:chdir ./d0 CWD is "/ACCT/GROUP/d0". /ACCT/GROUP/d0: listfile ./@ PATH= /ACCT/GROUP/d0/ d1/ d2/ d3/ f1 f2 f3 In the next example, using FORMAT=2 (DISC) option produces a listing of all files one level below the CWD. /ACCT/GROUP/d0:listfile ./@,2 PATH= /ACCT/GROUP/d0/ CODE ------------LOGICAL RECORD----------- ----SPACE---- FILENAME SIZE TYP EOF LIMIT R/B SECTORS #X MX 16W DBH 4 67107839 1 64 2 * d1/ 16W DBH 4 67107839 1 64 2 * d2/ 16W DBH 4 67107839 1 64 2 * d3/ 80B FA 12 12 1 16 1 1 f1 80B FA 12 12 1 16 1 1 f2 80B FA 12 12 1 16 1 1 f3 In the next example, specifying the absolute pathname produces a listing of all entries one level below the group. /ACCT/GROUP/d0:listfile /ACCT/GROUP/@,2 PATH= /ACCT/GROUP/ CODE ------------LOGICAL RECORD----------- ----SPACE---- FILENAME SIZE TYP EOF LIMIT R/B SECTORS #X MX 16W DBH 4 67107839 1 64 2 * *d0/ In the next example, specifying the NAME parameter produces a listing of all entries with names beginning with a lower case "d". The FORMAT=6 (QUALIFY) option is used to show the absolute pathname of ll HFS entries. /ACCT/GROUP/d0:listfile /;name=`d@';format=6 /ACCT/GROUP/d0/ /ACCT/GROUP/d0/d1/ /ACCT/GROUP/d0/d2/ /ACCT/GROUP/d0/d2/d4/ /ACCT/GROUP/d0/d2/d5/ /ACCT/GROUP/d0/d2/d5/d8/ /ACCT/GROUP/d0/d2/d6/ /ACCT/GROUP/d0/d3/ /ACCT/GROUP/d0/d3/d7/ /ACCT/GROUP/d0/d3/d7/d9/ The next example illustrates the use of the OBJECT=ACCT parameter to show all accounts on the system. /ACCT/GROUP/d0:listfile /;name=@,6;seleq=[object=acct]; /ACCT/ /SYS/ /TELESUP/ /TEST/ In the next example, specifying the OBJECT=GROUP parameter produces a listing of all groups on the system. /ACCT/GROUP/d0:listfile /;seleq=[object=group];format=qualify /ACCT/GROUP/ /ACCT/PUB/ /SYS/ALINE925/ ... /TELESUP/PUB/ /TEST/PUB/ /TEST/SPOOL/ /TEST/SPOOLSTD/ /TEST/TEMPLATE/ The next example illustrates the use of the OBJECT=DIR parameter to show all directories on the system. This is similar to the FINDDIR UDC. /ACCT/GROUP/d0:listfile /,qualify;seleq=[object=dir] / /ACCT/ /ACCT/GROUP/ /ACCT/GROUP/d0/ /ACCT/GROUP/d0/d1/ /ACCT/GROUP/d0/d2/ /ACCT/GROUP/d0/d2/d4/ /ACCT/GROUP/d0/d2/d5/ /ACCT/GROUP/d0/d2/d5/d8/ /ACCT/GROUP/d0/d2/d6/ /ACCT/GROUP/d0/d3/ /ACCT/GROUP/d0/d3/d7/ /ACCT/GROUP/d0/d3/d7/d9/ /ACCT/PUB/ /SYS/ /SYS/ALINE925/ /SYS/ALINK925/ . . . /TELESUP/PUB/ /TEST/PUB/ /TEST/SPOOL/ /TEST/SPOOLSTD/ /TEST/TEMPLATE/ The next example illustrates a summary listing (format option 1) of all files in subdirectory d3. /ACCT/GROUP/d0:listfile ./d3/@,1 PATH= /ACCT/GROUP/d0/d3/ CODE ------------LOGICAL RECORD------- FILENAME SIZE TYP EOF LIMIT 16W DBH 4 67107839 d7/ 80B FA 12 12 f10 80B FA 12 12 f7 80B FA 12 12 f8 80B FA 12 12 f9 The next example illustrates a detail listing (format option 3) of all files in subdirectory d3. /ACCT/GROUP/d0:listfile ./d3/@,3 ******************** FILE: /ACCT/GROUP/d0/d3/d7/ FILE CODE : 0 FOPTIONS: DIRECTORY BLK FACTOR: 1 OWNER : ** REC SIZE: 32(BYTES) GROUP ID: ** BLK SIZE: 32(BYTES) SECURITY--READ : EXT SIZE: 0(SECT) WRITE : NUM REC: 4 APPEND : NUM SEC: 64 LOCK : NUM EXT: 2 EXECUTE : MAX REC: 67107839 **SECURITY IS ON FLAGS : NO ACCESSORS NUM LABELS: 0 CREATED : TUE, JUL 21, 1992, 2:20 PM MAX LABELS: 0 MODIFIED: TUE, JUL 21, 1992, 2:23 PM DISC DEV #: 1 ACCESSED: WED, JUL 22, 1992, 12:05 PM SEC OFFSET: 0 LABEL ADDR: ** VOLCLASS : MPEXL_SYSTEM_VOLUME_SET:DISC ******************** . . . FILE: /ACCT/GROUP/d0/d3/f9 FILE CODE : 0 FOPTIONS: ASCII,FIXED,NOCCTL,STD BLK FACTOR: 1 OWNER : ** REC SIZE: 80(BYTES) GROUP ID: ** BLK SIZE: 80(BYTES) SECURITY--READ : EXT SIZE: 13(SECT) WRITE : NUM REC: 12 APPEND : NUM SEC: 16 LOCK : NUM EXT: 1 EXECUTE : MAX REC: 12 **SECURITY IS ON MAX EXT: 1 FLAGS : NO ACCESSORS NUM LABELS: 0 CREATED : TUE, JUL 21, 1992, 2:21 PM MAX LABELS: 0 MODIFIED: TUE, JUL 21, 1992, 2:21 PM DISC DEV #: 2 ACCESSED: TUE, JUL 21, 1992, 2:21 PM SEC OFFSET: 0 LABEL ADDR: ** VOLCLASS : MPEXL_SYSTEM_VOLUME_SET:DISC The next example illustrates the use of the FORMAT=-3 option to show the owner of a file. To use this option, you must be the file's owner, or you must have AM or SM capability. /ACCT/GROUP/d0:listfile /ACCT/GROUP/@,-3 ******************** FILE: /ACCT/GROUP/d0/ FILE CODE : 0 FOPTIONS: DIRECTORY BLK FACTOR: 1 OWNER : MANAGER.ACCT REC SIZE: 32(BYTES) GROUP ID: ACCT BLK SIZE: 32(BYTES) SECURITY--READ : EXT SIZE: 0(SECT) WRITE : NUM REC: 4 APPEND : NUM SEC: 64 LOCK : NUM EXT: 2 EXECUTE : MAX REC: 67107839 **SECURITY IS ON FLAGS : 1 ACCESSOR,SHARED NUM LABELS: 0 CREATED : TUE, JUL 21, 1992, 1:10 PM MAX LABELS: 0 MODIFIED: TUE, JUL 21, 1992, 2:16 PM DISC DEV #: 2 ACCESSED: WED, JUL 22, 1992, 11:40 AM SEC OFFSET: 0 LABEL ADDR: $000000E1 $0009A220 VOLCLASS : MPEXL_SYSTEM_VOLUME_SET:DISC The next example illustrates the use of the FORMAT=4 (SECURITY) option to display the security matrix for all objects one level below the group (in this case, d0). /ACCT/GROUP/d0:listfile /ACCT/GROUP/@,4 ******************** FILE: /ACCT/GROUP/d0/ ACCOUNT ------ READ : WRITE : APPEND : LOCK : EXECUTE : GROUP -------- READ : WRITE : APPEND : LOCK : EXECUTE : SAVE : FILE --------- READ : FCODE: 0 WRITE : **SECURITY IS ON APPEND : ACD EXISTS LOCK : EXECUTE : FOR MANAGER.ACCT: RACD, TD, RD, CD, DD The next example illustrates the use of the FORMAT=-2 (ACD) option to display the access control definition (ACD) for file f4 in subdirectory 2. Note that all users (@.@) have read ACD (RACD) access for this file. /ACCT/GROUP/d0:listfile ./d2/f4,-2 PATH= /ACCT/GROUP/d0/./d2/ -----------ACD ENTRIES--------------- FILENAME @.@ : RACD f4
Commands: LISTF, PLISTF (UDC), LISTFTEMP, FINDFILE (UDC), FINDDIR (UDC LISTDIR (UDC), LISTSPF (for spool files), ALTSEC Intrinsics: FFILEINFO, FLABELINFO Back to Main Index