0% found this document useful (0 votes)
76 views2 pages

Exercise 1 LINUX Commands

The document provides a list of 30 Linux commands related to files and directories to practice, including creating directories and files, changing directories, listing files, determining file types, modifying file timestamps, deleting files and directories, copying and moving files, and viewing and killing processes. It also provides 6 additional exercises involving calculations and programming tasks.

Uploaded by

aswinth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views2 pages

Exercise 1 LINUX Commands

The document provides a list of 30 Linux commands related to files and directories to practice, including creating directories and files, changing directories, listing files, determining file types, modifying file timestamps, deleting files and directories, copying and moving files, and viewing and killing processes. It also provides 6 additional exercises involving calculations and programming tasks.

Uploaded by

aswinth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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