You are on page 1of 2

EXERCISE 1

LINUX Commands

1. Create 3 directories
2. Create 2 files in each directory (use touch,cat,echo and vi)
3. Print your location currently working.
4. Change your current working directory.
5. Change directory using absolute path.
6. Change directory to home, previous directory,parent directory,root,sub directory.
7. Display hidden files and long listing of files.
8. Print the list in reverse order.
9. Determine the type of file. ( file 1.png )
10. Obtain the type of all files. (file *)
11. Obtain the type of all files of the current directory. (file /directory name/*)
12. List all special files.( file -s /dev/sda )

13. List out all the files starting from the alphabet present within the given range.
14. Obtain information about files and file system.(stat –f filename )
15. Change the file access and modification time.
16. Change on the modify time(touch –m).
17. update time of one file with reference to the other file.(- touch -r demo.txt Demo.txt )
18. delete files using extension.(rm *)
19. Delete file interactively(rm –i).
20. remove a directory forcefully(rm –rf)
21. delete directory recursively(rm –r/R).
22. Copy file to different directory.
23. Copy multiple files.
24. Copy a directory along with its sub directories.
25. Asks for confirmation before copy.
26. Move a file and ask for permission before over write(-i)
27. Move multiple files to specific directory.
28. Move files that doesn’t exit.(-u).
29. View process information (top,ps,ps –f )
30. Kill process.

Exercise 2

1. Find the sum of n terms of an AP. S=n/2(2a+(n-1)d)


2. Print the bmi category for a given weight and height.
3. Implement menu driven calculator.
4. Print the sum first ‘n’ even and odd numbers.
5. Print first 100 numbers divisible by 3 and 5.
6. To reverse a given string.

You might also like