Ravi Tutorials Provide Project Training

UNIX ASSIGNMENT-2



UNIX ASSIGNMENT-2



Tutorial-2
Subject : Unix shell programming
Duration: 60 Min


1. list the content of currrent directory having file names as number.
2. display the filename containing only alphabats as a names.
3. remove all files containing digit as the 2nd latter as their names.
4. create the file named " asd[0-9]".
5. copy the content of file c- to c1,c2,c3.
6. display the date in the following format
e.g. "Today's date is : Sat Jul 30 15:25:31 IST 2011"
7. compare 2 files named sc1, sc2 and store the common content in file result.
8. find how many number of lines from sc1 and sc2 are common.
9. display only those files containing the more then 5 character as there names ( the file names having
last two characters as digit).
10. create the directory named "maxx" and copy all files having only capital letters.
11. create a file named emp*
12. make a list of employee in following order ( use vi editor ).
empid  empname  post
1      abcd    programmer
2      xyz     manager

13. display only the last accessed file from current directory.
14. create file named emp_list having empid and date of joining.
15. copy the content of file "emp*" in emp_master1,emp_master2
16. rename file emp_master2 to backup_emp
17. remove file "emp*"
18. display the path of the directory where all your mail are stored.
19. create the following structure

export
|-- color
|-- dir1
|-- file1.lst
|-- m1
| |-- f1
| | `-- emp.lst
| `-- f2
|
`-- menu1.lst
|-- m2
| |-- d1
| `-- file123
`-- m3
|-- abc.php
|-- dir1
| `-- tmp
`-- xyz.java

20. copy file emp.lst to tmp directory ( in m3 dir ) using relative path.
21. protect the directory "export" against unauthorized access.
22. allow only read access to file emp.lst.
23. assign write permission only for group members and the rest permissions remain intact for the
directory "d1"
24. copy the content of file emp.lst to file123, make back up of file 'file123' and rename it with file_bkp
25. display the content of "export" directory in a way like question-19
26. display last modified file.
27. make archive file of all the files having .lst extension
28. move all .lst files to tmp directory
29. provide the permissions to the file "color" in such a way that only the owner can perform read and
write operation while group members and others can only execute a file.
30. change the ownership of file "tmp" to root

Aisect Computer Education

Aisect Computer Education
Aisect Computer Education