Linux Operating System

499 Words2 Pages
Assignment 3.1 Page 184 3. What happens when you give the following commands if the file named done already exists? $ cp to_do done $ mv to_do done Answer: Either command overwrites done with the contents of to_do. 4. How can you find out which utilities are available on your system for editing files? Which utilities are available for editing on your system? Answer: Give the command apropos editor. Typical errors are vim, ex, ed, and pico. Page 185 13. Try giving these two commands: $ echo cat $ cat echo Explain the differences between the output of each command. Answer: echo cat: outputs cat on the screen. Cat echo: attempts to output the contents of “echo” file to the screen. Page 220 1. Is each of the following an absolute pathname, a relative pathname, or a simple filename? a. Milk_co b. Correspond/business/milk_co c. /home/max d. /home/max/literature/promo e. .. f. Letter.0210 Answer: Absolute pathname – c, d Relative pathname – b, e Filename – a, f, e 2. List the commands you can use to perform these operations: a. Make your home directory the working directory. b. Identify the working directory Answer: a. Cd b. pwd 3. If the working directory is /home/max with a subdirectory named literature, give three sets of commands you can use to create a subdirectory named classics under literature. Also give several sets of commands you can use to remove the classics directory and its contents. Answer: Mkdir /home/max/literature/classics, mkdir ~max/literature/classics, or mkdir ~/literature/classics Rmdir /home/max/literature/classics, rmdir ~max/literature/classics, rmdir ~/literature/classics, or rm –r /home/max/literature/classics 6. You should have read permission for the /etc/passwd/ file. To answer the follow questions, use cat or less

More about Linux Operating System

Open Document