Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need help 17. I have a directory called \"~/MyFiles.\" It\'s owned by user \'pc\

ID: 3850191 • Letter: N

Question

Need help

17. I have a directory called "~/MyFiles." It's owned by user 'pc' and group 'pc.' Change the ownership so that it is now owned user 'super' and group "secret". (5 points) 18. Create a crontab entry that would run the file /etc/clear.sh every day at 3AM. 19. Create a crontab entry that would run the file /etc/clear.sh every Wednesday at 5:01PM. 20. Create a command that will find all files under / that end in the extension *.txt, and whose contents contain either the word "new" or "old" or "borrowed" or "blue". (Look at egrep, watch the video!). CHECK YOUR WORK! (5 points).

Explanation / Answer

I have a directory called "~/MyFiles." It's owned by user 'pc' and group 'pc.' Change the ownership so that it is now owned user 'super' and group "secret".

You can change both the owner and group of a file using just the chown command.

syntax:

chown username:group name nameofyourdirectory


chown super:secret name of your directory

ls -l name of your directory

-rw-rw-r-- 1 super secreat 0 jan 12:44 your directoryname
The directory directoryname is now owned by super and belongs to the secreat group.

2.Easy to remember format about crontab:

* * * * * command to be executed
- - - - -
| | | | |
| | | | -----> day of week---->(0 - 7)-----> (Sunday=0 or 7)
| | | -------> month----->(1 - 12)
| | ---------> day of month---->(1 - 31)
| -----------> hour----->(0 - 23)
-------------> minute----->(0 - 59)


00 3 * * * root/etc/clear.sh "Runs at 03:00 AM every day"

3.
01 17 * * 3 root/etc/clear.sh "Runs at 05:01 PM every day"

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote