Create a directory ‘Assignment1’. Go inside the directory ‘Assignment1’. Create directories ‘a’,… 1 answer below »

1. Create a directory ‘Assignment1’.

2. Go inside the directory ‘Assignment1’.

3. Create directories ‘a’, ‘b’, ‘e’, ‘f’ using single command where ‘a’, ‘b’ are inside

directory ‘Assignment1’ and ‘e’ is inside ‘b’ and ‘f’ is inside ‘e’.

4. Go inside directory ‘a’.

5. List all the files and folders(not hidden files) in your home directory in long listing

format and store the output in a file named ‘file.txt’ in the current directory.

6. Rename ‘file.txt’ to ‘file1.txt’.

7. Copy ‘file1.txt’ to directory ‘f’ with filename as ‘file2.txt’.

8. Get the fifth field(column) of the content of the file ‘file1.txt’ separating each field

by space and display all the unique values. (Hint: you will need to replace multiple

spaces by a single space).

9. Go inside directory ‘f’ in single command.

10. Display the path of your working directory.

11. Go back to the previous working directory.

12. Change the timestamp of ‘file1.txt’.

13. Go back to the parent directory.

14. Create a file ‘file3.txt’ in the current directory with at least 20 lines (without using

vim or any other text editor).

15. Display the first 10 lines of ‘file3.txt’.

16. Display the lines from 7 through 15 of ‘file3.txt’.

17. Count the number of words in ‘file3.txt’.

18. Print “hello world” on terminal.

19. Display the path to the binary file of `ls`.

20. Display the last 5 commands you ran on terminal.

21. Create 5 empty files: lab1.txt, lab2.txt, lab3.txt, lab4.txt, lab5.txt in a single

command.

22. Rename the above files to lab1.c, lab2.c, lab3.c, lab4.c, lab5.c in a single command.

23. List the content of your directory in a tree-like format.

24. List the content of your current directory in long list format sorted by modification

time.

25. List the content of your current directory in long list format sorted in increasing

order of file size

Attachments:

"Is this question part of your assignment? We can help"

ORDER NOW