UNIX commands in Real time Projects

1- How to display the 10th line of a file?

2- How to remove the header from a file?

3- How to remove the footer from a file?

4- Write a command to find the length of a line in a file?

it can be used to get a line from a file.

To find the length of 10th line in a file.

5- How to get the nth word of a line in Unix?

6- How to reverse a string in UNIX?

7- How to check if the last command was successful in unix?

8 – How will you find which operating system is running on Unix?

9- Write a command to print the lines that starts with the word “while”?

10- What does $# stands for?

It will return the number of parameters passed as command line argument.

11- What is difference between diff and cmp command?

  • cmp -It compares two files byte by byte and displays first mismatch.
  • diff – It displays all changes required to make files identical.

12- What is command to kill last background Job?

13- How kill the process?

14- What is command to check space in Unix?

15 – How to check all the running processes in Unix?

16- How to check if a file is present in a particular directory in Unix?

17- How to check the length of any line in a file?

18- Write a command to display todays date in the format of ‘yyyy-mm-dd’?

19-  Write a command to print the line number before each line?

20 – Write a command to print the lines that has the the pattern “july” in all the files in a particular directory?

21- Write a command to replace the word “divide” with “sum” in file?

22-

Post Author: Rohit

Leave a Reply

Your email address will not be published. Required fields are marked *