Write a command which will change the permissions on a file


I. Multiple Choice

DIRECTIONS: Save this document on your local machine. Use the blue-bordered box for your answers - for each question, type the answer you have selected into that box.

1. Which command is used to change the ownership of a file?

a. chmod                                             c. setuser

b. mv                                                   d. chown

2. Which option to the rm command will cause the shell to prompt for confirmation before deleting each file in the parameter list?

a. -r                                                      c. -f

b. --interactive                                     d. --prompt

3. Which of these numbers represents read-write permission for the owner and read permission for other groups (should be the default for a file created with vi)?

a. 622                                                  c. 644

b. 755                                                  d. 600

4. Which of the following are valid command-line operators?

a. |                                         c. :)

b. <-                                        d. all of the above

II. Short Answer

DIRECTIONS: Type the answer to each question in the blue box associated with it.

5. Write a command which will change the permissions on a file named boreworms.txt so that the owner of the file has read and execute permission, the group owner has read permission, and no one else has any access to the file.

6. Write a command which will search some of the files in your current directory for the string "mingo". All of the files which are of interest to you have the form flashcomicXXX.txt, where XXX is a 3-digit number.

7. Write a command which will move a file named boreworms.txt from your current working directory to the home directory of a user named lizardman.

8. Write a command which will display a word count of a file named flashcomic123.txt.

Solution Preview :

Prepared by a verified Expert
Operating System: Write a command which will change the permissions on a file
Reference No:- TGS01368013

Now Priced at $50 (50% Discount)

Recommended (91%)

Rated (4.3/5)