mirror of
https://github.com/PDP-10/its.git
synced 2026-03-10 20:53:40 +00:00
Build the DIR device.
This commit is contained in:
committed by
Eric Swenson
parent
ad492867c2
commit
26df9785e1
@@ -74,6 +74,7 @@ from scratch.
|
||||
- TCTYP and CRTSTY, terminal handling.
|
||||
- PEEK, system monitoring.
|
||||
- ARCDEV, transparent file system access to archive files.
|
||||
- DIRDEV, list directories, sorted or subsetted.
|
||||
- ATSIGN TARAKA, starts dragons.
|
||||
- Dragons: DMPCPY, MODEMS, NETIME, PFTHMG.
|
||||
- MTBOOT, make bootable tapes.
|
||||
|
||||
@@ -412,6 +412,9 @@ expect ":KILL"
|
||||
|
||||
respond "*" ":link device;tcp syn123,device;atsign mlslv\r"
|
||||
|
||||
respond "*" ":midas device;atsign dirdev_syseng;dirdev\r"
|
||||
expect ":KILL"
|
||||
|
||||
respond "*" ":midas sys1;ts cftp_sysen2; cftp\r"
|
||||
respond "KLp==" "0\r"
|
||||
expect ":KILL"
|
||||
|
||||
@@ -14,3 +14,4 @@
|
||||
- TCTYP: [manual](_info_/tctyp.order)
|
||||
- DSKDUMP: [commands](sysdoc/dskdmp.order)
|
||||
- FIND: [manual](init/find.13)
|
||||
- DIRDEV: [manual](_init_/dir.order)
|
||||
|
||||
160
doc/_info_/dir.order
Executable file
160
doc/_info_/dir.order
Executable file
@@ -0,0 +1,160 @@
|
||||
The DIR device
|
||||
|
||||
A new device has been defined (it will work only on ITS with version
|
||||
number greater than 886). This device allows users and programs to
|
||||
see sorted directories or subsets of directories. The DIR device
|
||||
supports both image and ascii mode directories which means that it can
|
||||
be PRINTed or used in programs like DIRED and FIND.
|
||||
|
||||
The DIR device requires a file name much like a disk path name.
|
||||
It takes a device name (DIR), a user's directory name, and two file
|
||||
names. The directory name identifies the disk directory to be sorted
|
||||
or subsetted, while the two file names indicate what to do with the
|
||||
directory. The device name may also be DIRxxx, which will cause
|
||||
device xxx: to be used instead of DSK. For example, DIRML: will go
|
||||
over the net to the ML machine, and DIRAR3: will look at the
|
||||
specified user's AR3 archive.
|
||||
|
||||
There are currently two types of operations - sorting and subsetting.
|
||||
|
||||
If you wish to sort, the first file name you supply will identify the
|
||||
sort key and the second file name will determine whether an ascending
|
||||
or descending sort is used (DOWN => descending, UP implies ascending).
|
||||
The following table gives the currently recognized first file names
|
||||
for sorting:
|
||||
|
||||
file name => sort key
|
||||
|
||||
NAME1 sort on first file name
|
||||
NAME2 sort on second file name
|
||||
LENGTH or SIZE sort on file length
|
||||
(links have len = 0)
|
||||
CDATE sort on creation date
|
||||
RDATE sort on reference date
|
||||
|
||||
Note that numeric names are sorted specially: The numeric names come
|
||||
before any non-numeric names, and the numeric names are ordered by
|
||||
number, not by name (so for example, 10 comes after 9, instead of
|
||||
before it.)
|
||||
|
||||
For subsetting, the directory subset will be sorted like NAME1 UP.
|
||||
|
||||
If the first file name you supply is NOT or ONLY, it indicates whether
|
||||
only those things with the named attribute (if ONLY) or only those
|
||||
things without the named attribute (if NOT) are retained. The second
|
||||
file name indicates the attribute upon which the decision should be
|
||||
made:
|
||||
|
||||
file name ==> attribute
|
||||
|
||||
LINKS or LINK whether file is a link
|
||||
DUMPED whether file is backed up
|
||||
PACKnm whether file is on disk pack nm
|
||||
|
||||
If the first file name is one of: CDATE> CDATE= CDATE< RDATE> RDATE= RDATE<
|
||||
then the second file name must be a date in YYMMDD format.
|
||||
|
||||
The directory subset returned consists of only those files which pass
|
||||
the test, such as:
|
||||
all files created since new years: CDATE> 750000
|
||||
all file created on last July 4: CDATE= 740704
|
||||
and similarly for reference date. Note that you can use 00's even
|
||||
though those are normally not legal dates. Additionally, these work
|
||||
on links just like CDATE UP and CDATE DOWN, even though you usually
|
||||
don't see creation dates for them.
|
||||
|
||||
If the first file name is FIRST, FIRST#, or SECOND, the second file
|
||||
name specifies a pattern in DIRED-style "* format". Examples:
|
||||
all files named NBIN: SECOND NBIN
|
||||
all files with 1st name starting with BAR: FIRST BAR***
|
||||
|
||||
FIRST# is like FIRST, except that it will only consider files with a
|
||||
numeric fn2. Thus FIRST# ****** will give you all the files with
|
||||
purely numeric second names (and any first name). Also, FIRST# cause
|
||||
the numeric fn2's to be right-justified in the listing.
|
||||
|
||||
If the file names given are not one of the valid forms listed above,
|
||||
you will get a "mode not available" error. If the file names are
|
||||
valid but the directory can not be opened, you will get whatever that
|
||||
open error is. For example: DIR:BLECH;NAME1 UP will cause a
|
||||
"non-existent user name" error.
|
||||
|
||||
Examples:
|
||||
|
||||
DIR:.INFO.;CDATE DOWN
|
||||
will give a directory of all the .INFO. files with the
|
||||
most recently created ones listed first.
|
||||
|
||||
|
||||
DIR:SYS;ONLY LINKS
|
||||
will give a directory with those files in SYS
|
||||
that are links
|
||||
|
||||
|
||||
The DIR device handler can also be used to intercept DSK (or AI, DM,
|
||||
ARC, etc.) device requests by means of translation entries. Saying
|
||||
the following to DDT (eg. in your .DDT. (INIT) file)
|
||||
*: *; .FILE. *, JOB:DEVICE;JOBDEV DIR
|
||||
*: *; ****** *, JOB:DEVICE;JOBDEV DIR
|
||||
*: *; * ******, JOB:DEVICE;JOBDEV DIR
|
||||
*: *; * ######, JOB:DEVICE;JOBDEV DIR
|
||||
will allow you to use the following features of the DIR handler:
|
||||
|
||||
.FILE. (DIR) acts like DIR: NAME1 UP,
|
||||
which will give you a DIR-style directory listing
|
||||
(with tenths-of-blocks and reference dates) instead of the normal
|
||||
system listing. (Note that .FILE. (DIR) is what TECO reads to do the
|
||||
EY command, so EY will give you the new format.
|
||||
|
||||
.FILE. +<foo> acts like DIR: ONLY <foo>
|
||||
.FILE. -<foo> acts like DIR: NOT <foo>
|
||||
.FILE. /<foo> acts like DIR: <foo> UP
|
||||
.FILE. \<foo> acts like DIR: <foo> DOWN
|
||||
****** <name> acts like DIR: SECOND <name>
|
||||
<name> ****** acts like DIR: FIRST <name>
|
||||
<name> ###### acts like DIR: FIRST# <name>
|
||||
|
||||
Note the fact that all .FILE. (DIR) requests must go through the DIR
|
||||
handler will significantly slow down the FIND program. Thus the
|
||||
translation entry should be removed (via .FILE.) before running FIND.
|
||||
|
||||
|
||||
Using the DIR device:
|
||||
|
||||
There are basically four ways to use the DIR right now:
|
||||
|
||||
(1) Print it using DDT, etc.
|
||||
For example, try typing :PRINT DIR:SYS;ONLY LINKS to DDT.
|
||||
This will get you a ":LISTF" of the links in the SYS directory.
|
||||
|
||||
(2) Use it in TECO macros for getting at various directory subsets.
|
||||
For example, DIR: FIRST <whatever> or <whatever> ****** (with the
|
||||
appropriate DDT translation entry) can be used in the M..G
|
||||
directory display macro to only display the appropriate files.
|
||||
Also, DIR: FIRST# <whatever> (or DSK: <whatever> ######) can be
|
||||
used in the "erase all but the last few numerically-named copies
|
||||
of <whatever>" macro. Doing these kinds of subsetting via the DIR
|
||||
device is usually faster than reading in the whole directory
|
||||
(which the system must convert to acsii) and then subsetting it
|
||||
using TECO commands. The file AI:GROSS;^TECO^ > contains some
|
||||
examples (see the macros .F, F, Z, and D)
|
||||
|
||||
(3) Use it in DIRED. NDIRED now knows about the DIR device.
|
||||
For example, try typing ACT DIR:SYS;ONLY LINKS to NDIRED.
|
||||
This will activate a directory consisting of only the links in the
|
||||
SYS directory. NDIRED will do all copies, deletes, etc. via the
|
||||
DSK for efficiency.
|
||||
|
||||
(4) Use it with DFIND. This is a special version of FIND for use with the
|
||||
DIR device. You may NOT do file name pattern matching since the file
|
||||
names you specify will be interpreted as names for the DIR device.
|
||||
You can, however, use it for other purposes. For example try typing
|
||||
the following to DDT: :DFIND ONLY PACK20
|
||||
This will cause every directory on the system to be searched for
|
||||
files that are on pack 20.
|
||||
|
||||
Report problems to BUG-ITS@MIT-MC.
|
||||
Reasonable suggestions for modifications will be considered.
|
||||
(Formerly maintained by GROSS@AI or PDL@DM.)
|
||||
|
||||
|
||||
111
doc/_info_/dir.recent
Executable file
111
doc/_info_/dir.recent
Executable file
@@ -0,0 +1,111 @@
|
||||
CHANGES TO DIR DEVICE BY VERSION NUMBER, SOURCE FILE IS DM:DEVICE;DIRDEV >
|
||||
|
||||
80 (6/11/78 MOON) Fixed to work with SIOT (e.g. LISP I/O) and with
|
||||
new-type archives.
|
||||
|
||||
79 (7/29/77 JMB) .FILE. (DIR) is translated to NAME1 UP.
|
||||
|
||||
52 (5/23/76 JMB) New DDT mode (for DDT) just like FIRST mode.
|
||||
NAME1 <fname> & NAME2 <fname>, where <fname> is not UP or DOWN,
|
||||
first gives files whose specified name matches <fname>, then
|
||||
ones after it (in ASCENDING order), and then ones before it, with
|
||||
each group preceded by a line of dashes.
|
||||
|
||||
51 (5/15/76 JMB) Print file size like FIND (NNN+NNN).
|
||||
Changed format of links.
|
||||
|
||||
50 (5/8/76 JMB) Added display of REAP bit.
|
||||
Changed AR* handling to read directly from archive file.
|
||||
Gets headers from device handler, if possible.
|
||||
Prints author for DSK or DM files when running on DM only.
|
||||
|
||||
49 (5/7/76 JMB) Changed format of ascii directory output.
|
||||
|
||||
48 (5/5/76 JMB) Add -FIRST mode, opposite of FIRST mode.
|
||||
|
||||
47 (11/7/75 GROSS) Clean up a little.
|
||||
|
||||
46 (11/6/75 GROSS) Hack files bigger than 256 blocks.
|
||||
|
||||
45 (11/6/75 GROSS) Fix bug in FLEN.
|
||||
|
||||
44 (9/6/75 GROSS) Fix bug in RJNUM - non-final "9"s lost.
|
||||
Have CNAMES not do RJNUM stuff if doing FIRST#.
|
||||
|
||||
43 (8/19/75 GROSS) Put lots of code in the output buffer.
|
||||
Flush some spurious SETZM's.
|
||||
|
||||
42 (8/17/75 GROSS) Don't do (41) if fname is .FILE. (DIR)
|
||||
Put most of the OPEN code into the directory buffer.
|
||||
|
||||
41 (8/16/75 GROSS) Hack image-mode dirs for NDIRED, etc.
|
||||
|
||||
40 (8/16/75 GROSS) Add hacks for .FILE. /<foo>.
|
||||
|
||||
39 (8/15/75 GROSS) Add stuff for 2nd output line.
|
||||
Use 0 as the file-length for links.
|
||||
|
||||
38 (8/14/75 GROSS) Add hacks for .FILE. +<foo>.
|
||||
|
||||
37 (8/13/75 GROSS) Add FIRST# mode and ######
|
||||
for getting files with numeric 2nd fname.
|
||||
Do syntax check before opening directory.
|
||||
Use right-justified numbers for comparison.
|
||||
|
||||
36 (7/26/75 GROSS) Use 777777 for link's flen,
|
||||
and change MAXCHS to reflect the fact that if you have
|
||||
the max # of files, each will have at most a 3 char
|
||||
length (being n.m).
|
||||
Add decoding for DIRxxx devices.
|
||||
Separate pure & impure stuff.
|
||||
|
||||
35 Clean up a lot:
|
||||
Flush GCDIR in favor of faster SUBSET.
|
||||
Flush DIRSRT in favor of faster SORT.
|
||||
Make the open filename decoding simpler.
|
||||
Have LISTF do it all at once (not 1 line at a time).
|
||||
|
||||
34 Use JOBCAL instead of JOBGET in interrupt handler.
|
||||
|
||||
33 (7/23/75 GROSS) If null cdate, don't print time.
|
||||
|
||||
32 (7/22/75 GROSS) Pass back the real error code
|
||||
when the directory open fails.
|
||||
|
||||
31 (7/22/75 GROSS) Do ascii open so TTY will work.
|
||||
|
||||
30 (7/21/75 GROSS) Flush lots of extraneous krud.
|
||||
Have file-length give 1 decimal place.
|
||||
Put referenced-date in the output.
|
||||
Add "SIZE" as an alias for "LENGTH".
|
||||
Add device hackery:
|
||||
DIR: Works normally.
|
||||
(36) DIR<foo>: Like DIR:, but uses device <foo>:
|
||||
(36) For example, DIRML:LUSER;RDATE DOWN
|
||||
JOB: Loses.
|
||||
Anything else is treated like DSK:
|
||||
.FILE. (DIR) ACTS LIKE NAME1 UP
|
||||
.FILE. +<foo> ACTS LIKE ONLY <foo>
|
||||
.FILE. -<foo> ACTS LIKE NOT <foo>
|
||||
(40) .FILE. /<foo> ACTS LIKE <foo> UP
|
||||
(40) .FILE. \<foo> ACTS LIKE <foo> DOWN
|
||||
<NAME> ****** ACTS LIKE FIRST <NAME>
|
||||
(37) <NAME> ###### ACTS LIKE FIRST# <NAME>
|
||||
****** <NAME> ACTS LIKE SECOND <NAME>
|
||||
To use these features, tell DDT
|
||||
AI *: *; .FILE. *, DIR:
|
||||
AI *: *; ****** *, DIR:
|
||||
AI *: *; * ******, DIR:
|
||||
(37) AI *: *; * ######, DIR:
|
||||
|
||||
29 (3/30/75 PDL) Put insert files into this file.
|
||||
Added new modes: CDATE>, CDATE=, CDATE<, same for RDATE,
|
||||
and NAME1, NAME2.
|
||||
Date hackers take 741231 style dates,
|
||||
name hackers take * format names.
|
||||
|
||||
28 (3/25/75 PDL) Changed to give MODE NOT AVAILABLE if files
|
||||
not from legal list instead of just giving directory
|
||||
untouched.
|
||||
|
||||
------- DIR ORDER updated to this point. -------
|
||||
1596
src/syseng/dirdev.86
Executable file
1596
src/syseng/dirdev.86
Executable file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user