Lab Exercises
Lab Exercises for UNIX Administration
Lab 1
1. Obtain the following results
(i) To print the name of operating system
(ii) To print the login name
(iii) To print the host name
2. Find out the users who are currently logged in and find the particular user too.
3. Display the calendar for
(i) Jan 2000
(ii) Feb 1999
(iii) 9th month of the year 7 A.D
(iv) For the current month
(v) Current Date Day Abbreviation , Month Abbreviation along with year
4. Display the time in 12-Hour and 24 Hour Notations.
5. Display the Current Date and Current Time.
6. Display the message “GOOD MORNING” in enlarged characters.
7. Display the name of your home directory.
8. Create a directory SAMPLE under your home directory.
9. Create a sub-directory by name TRIAL under SAMPLE.
10. Change to SAMPLE.
11. Change to your home directory.
12. Change from home directory to TRIAL by using absolute and relative pathname.
13. Remove directory TRIAL.
14. Create a directory TEST using absolute pathname.
15. Using a single command change from current directory to home directory.
16. Remove a directory using absolute pathname.
17. Create files myfile and yourfile under Present Working Directory.
18. Display the files myfile and yourfile.
19. Append more lines in the myfile and yourfile files.
20. How will you create a hidden file?.
21. Copy myfile file to emp.
22. Write the command to create alias name for a file.
23. Move yourfile file to dept.
24. Copy emp file and dept file to TRIAL directory
25. if you compare a file with itself.
26. Compare myfile file and emp file.
27. Append two more lines in emp file existing in TRIAL directory.
28. Compare employee file with emp file in TRIAL directory.
Centre for Information Technology and Engineering, Manonmaniam Sundaranar University
1