Question: Look at the file listing below which was generated by the ls - l command: total 6 8 - rw - r - - -

Look at the file listing below which was generated by the ls -l command:
total 68
-rw-r-----1 nick staff 126 Feb 714:19 file1
-rw-rw-r--1 nick video 77 Feb 714:21 file2
-rwxr-xr-x 1 nick nick 60438 Feb 714:21 file3
(a) For each file, who can write information to them? [6]
(b) Which files are executable? [2]
(c) A program is compiled and results in an executable file prog being created in
this directory. When the command prog is issued at the prompt, the following
is printed:
bash: prog: command not found
Why does the program not run, and what could be done to correct this?
[4]
(d) The command ln -s file1 f1 ; ln file2 f2 is executed and the contents
of this directory are now listed as follows:
lrwxrwxrwx 1 nick nick 5 Feb 714:40 f1-> file1
-rw-rw----2 nick video 77 Feb 714:21 f2
-rw-r--r--1 nick nick 126 Feb 714:19 file1
-rw-rw----2 nick video 77 Feb 714:21 file2
-rwxr-xr-x 1 nick nick 60438 Feb 714:21 file3
-rw-r--r--1 nick nick 60641 Feb 714:37 prog
The user then enters the command rm file* without properly considering the
consequences.
i. If the ls command which produced the above were repeated, which entries
would no longer be present? [5]
ii. Are the old contents of file1 and file2 still accessible through f1 and
f2? Explain your answer.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!