.gif,
where the letters ``gif'' can be in upper or lower-case, and the string
takes up the whole of the line.
typedef struct option_t {
int set; /* boolean: option is set or unset */
char option; /* the single char for the option */
char *usage; /* string to print for help/usage messages */
} option_t;
Given an array of options
#define NUM_OPTS 3 option_t options[NUM_OPTS];
set and usage values.
void initialise_options(option_t options[])
int check_option(char opt, option_t options[],
int num_opts)
that will put the appropriate set field to true.
The function should return true if it could find a matching option,
or false otherwise.
opendir() etc
to count the number of files (including directories) in the
current directory. Do not include `.' and `..' if they exist.
Print the final count to standard output.
uid
(a positive integer) of the owner of the file.
It should return a suitable error value if the information cannot be
obtained. Hint: use stat()
(see attached man page).
Virtual Page page index ------------------- 0 3 1 1 2 3 4 2 5 6 0 7What are the actual physical addresses of the following virtual addresses (in octal):
../file1
(if the file exists).
..\file1 (if the file exists).
get a new block from the free list
write data to the block
update inode/FAT pointers
update size, last modified, etc fields
If the system crashes somewhere during this
(or is switched off, etc),
discuss some of the ways in which the
filesystem can become `inconsistent' i.e. have some
erroneous values.
pine starts it creates a lock file
and will not allow you to start another copy of the mailer till the
lock is removed. When netscape starts it creates a lock
file and if you try to start another one then it warns you about the
lock.
How do they do this, and what is the purpose of it?