1 DSKUSE Package. User information.
2 This file contains a description of the the functions available in the
3 Macsyma DSKUSE package.
6 With no args or an arg of TRUE, will return the total number of
7 free blocks of disk space in the system.
8 With an arg of 0, 1, or 13, it will return the number of free blocks
9 of diskspace on the respective disk pack.
10 With an arg of SECONDARY or PRIMARY, it will return the total
11 number of free blocks of disk space on the secondary or primary
12 disk pack respectively.
14 FULLDISKUSE(<optional-name>);
15 If no name is supplied, it defaults to the current user's.
16 Returns long list of info about user's disk usage of the form:
18 [["TOTAL FREE BLOCKS", [<pack-type>, <pack-number>, <n> BLOCKS],
19 [<pack-type>, <pack-number>, <n> BLOCKS], ...]
20 ["DIRECTORY BLOCK USAGE", <directory-name>
21 ["PRIMARY", <n> BLOCKS],
22 ["SECONDARY", <n> BLOCKS]]
23 ["USER BLOCK USAGE", <user-name>,
24 [PRIMARY, <n> BLOCKS],
25 [SECONDARY, <n> BLOCKS]]]
27 If the user has his own directory, the last element of the list
28 ("USER BLOCK USAGE") is omitted since it would be the same as
29 "DIRECTORY BLOCK USAGE".
31 <pack-type> ::= "PRIMARY PACK" or "SECONDARY PACK"
32 <pack-number> ::= a fixed point number
33 <n> ::= a fixed point number
35 Occurances of `<n> BLOCKS' are in the form of a Macsyma
36 multiplication between a fixnum <n> and the Macsyma symbol BLOCKS.
38 DISKUSE(<optional-name>);
39 returns the total number of disk blocks in use by a user.
40 The result is of the form <n>*BLOCKS
42 PRINTDISKUSE(<optional-name>);
43 displays in English information about a user's disk usage.
45 For examples of use see the file SHARE2;DSKUSE OUTPUT
48 This usage file was last updated: Monday, 12 March 1979.
50 (C1) PRINTDISKUSE(); /* KMP made this sample run, so since no name was
51 given as an arg, his name will be assumed... */
53 DSKUSE FASL DSK SHARE2 being loaded
56 1532 Total Free Disk Blocks:
57 989 on Primary Pack and 543 on Secondary Pack.
58 Directory use by the KMP directory:
59 449 blocks on Primary Pack and 14 blocks on Secondary Pack.
63 (C2) DISKUSE(KMP); /* How many blocks of files does KMP have? */
67 (C3) FULLDISKUSE(KMP); /* KMP has his own directory */
69 (D3) [[TOTAL FREE BLOCKS, [PRIMARY PACK, 0, 480 BLOCKS],
70 [PRIMARY PACK, 1, 509 BLOCKS],
71 [SECONDARY PACK, 13, 543 BLOCKS]],
72 [DIRECTORY BLOCK USAGE, KMP,
73 [PRIMARY, 449 BLOCKS],
74 [SECONDARY, 14 BLOCKS]]]
76 (C4) FULLDISKUSE(LPH); /* LPH is one of the users of the USERS3 directory */
78 (D4) [[TOTAL FREE BLOCKS, [PRIMARY PACK, 0, 481 BLOCKS],
79 [PRIMARY PACK, 1, 512 BLOCKS],
80 [SECONDARY PACK, 13, 543 BLOCKS]],
81 [DIRECTORY BLOCK USAGE, USERS3, [PRIMARY, 239 BLOCKS],
82 [SECONDARY, 72 BLOCKS]],
83 [USER BLOCK USAGE, LPH, [PRIMARY, 6 BLOCKS], [SECONDARY, 0 BLOCKS]]]
85 (C5) DISKFREE(1); /* How many blocks are free on disk pack 1? */
89 (C6) DISKFREE(PRIMARY); /* How much free space is on both primary packs? */
93 (C7) DISKFREE(); /* How much disk space is available (Primary + Secondary)? */