Question on Unix Primer.

Question Bank
10.1 Follow the sequence given below:
a. Use editor vi to create a 10 line text file called tfile.
b. To this append the following line: The quick brown fox jumped on lazy dog.
c. Move the cursor to the top and yank the first two line to the bottom of the page.
d. Give an edit command to search for the string “lazy” and replace it by a string “not so lazy a”.
e. Undo the last step.
f. Delete the 4th and 5th lines.
10.2 Follow the steps in sequence given below
a. Create a directory called Level1 in your directory
b. Create a directory called Level2 under Level1 and change directory to Level2
c. Create a text file called tfile under the directory Level2
d. Copy the file tfile in the directory Level1
e. While you are still in directory Level2, list the contents of directory Level1.
10.3 Repeat question no. 10.2 with the modification of step d modified to read as follows:
a. Create a link to tfile in directory Level1.
10.4 Like me you too have a problem of "roll-over" and often type "hte" for the word "the". In a file edit session using vi editor what edit command will ensure that you are able to do a global replacement with confirmation before each replacement.
10.5 Suppose I have a file called my_file. How can it be renamed as your_file?
10.6 What does the character tilde (“~”) represent?
10.7 How does one determine the number of links a file may have?
10.8 What is the short cut to move up one level from current directory.
10.9 List all the .h files under the root directory – and display these page by page.
10.10 How would do you list the files in your parent directory in descending order of disk blocks used by the files.
10.11 Follow the steps in the sequence given below:
a. Log in your system using your login name and pass word.
b. Display the contents of your home directory.
c. Change the directory to root, list the contents and identify the purpose for each directory in it.
10.12 Display the current time on screen.
10.13 Go to the parent directory of your home directory. What is listed out there?
10.14 Find out what directories are there under /usr/bin/lib
10.15 Why was UNIX designed with lots of “tools”?
10.16 Why is it that "Unix" is often described to be an open system?
10.17 ALSO SELECT QUESTIONS FROM THE BOOK
10.18 Perform the following operations on a given file
a. Print every line after erasing the 2nd field
b. Find maximum and minimum values present in column 1
10.19 Display the contents of a file given below in a sorted order of the time Eg file entries are
1234 HD 13324 22:40:54 ....
1235 HD122235 22:43:12 .

Comments

Popular posts from this blog

Introduction to Operating Systems:Early History: The 1940s and 1950s

Input Output (IO) Management:HW/SW Interface and Management of Buffers.

Summary of Process Concepts