Unix Assignment
Unix Assignment
1. Write a command to list all the files inside a folder i.e. if there is a folder inside a folder then
it should list all files inside the sub-folder which is inside the folder to be listed.
2. How will you copy a directory structure dir1 to dir2 ? (with all the subdirectories)
3. How can you find out if you have the permission to send a message?
5. What is the command for printing the current time in 24-hour format?
6. What is the command for printing the year, month, and date with a horizontal tab between the
fields?
7. Create the following files: chapa, chapb, chapc, chapd, chape, chapA, chapB, chapC, chapD,
chapE, chap01, chap02, chap03, chap04, chap05, chap11, chap12, chap13, chap14, and chap15.
8. With reference to question 7, What is the command for listing all files ending in small letters?
9. With reference to question 7, What is the command for listing all files ending in capitals?
10. With reference to question 7, What is the command for listing all files whose last but one
character is 0?
11.With reference to question 7, What is the command for listing all files which end in small
letters but not a and c?
13. For a file named myfile in the working directory, do the following:
a) give everyone permission to read myfile. No other privilege is to be changed
b) allow the owner and group members to read and write the file. All privileges are to be
removed for everyone else.