To anyone familiar with Unix, I'm just learning Unix/Linux at the very beginning. These are book questions and I've tried to look them up but not sure if these are correct or not. If anyone can confirm my answers were proper I would appreciate it?
1. How would you change ownership of the file small.txt from the root to the user don?
(I'm not really clear what a super user is but it looks like someone in charge of root or all files in the directory. The book showed something similar from what I have done below, not sure if these are correct though?)
my answer) $su
#ls -l small.txt
#chown don small.txt
# ls-l small.txt
2. How would you change the group for the file small.txt from the group 0(root) to the group 500(accounting)?
my answer) Chown -R 0:500
3. How would you change the last modification time to the file small.txt>
my answer) Write to the file.
4. You have a file named small.txt in your accounting sytstem directory, you would like to have the sales department be able to see the file but the sales department does not have acces to the accounting directories. You do not want to copy the file to the sales directory as it is changed by accounting regularly. The best solution would be to create link. Show how you would link the file to a new file with the same name in a directory called sales(/u/sales) and retain the original file name.
my answer) $ ln -s ../u/sales/small.txt small.txt
5. 20. How would you search the entire computer for the file small.txt. (Command and switches).
my answer) $ find /home -name small.txt -print
If anyone has any insight, I would appreciate it.
3) touch -m small.txt
Thank you.
Would command touch -m small.txt also change the last access time? I just put open the file to change the last access time.
I just googled touch, as I recalled that command being likely to help. It has several options.
I could really use some help understanding this question:
Interpret the following crontab entry:
30 21 * * * find /tmp /usr/tmp -atime +30 -exec rm -f { } \;
My answer was that at 9:30 pm everyday the find command is executed. I don't know how to describe the rest of the command. Does it make sense to anyone or can you help me understand what this does?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks