This is an intentional post to my students at UNI. We are learning how to use the shell commands on Linux. The simplest example is to register the datatime in a file in my home every 2 minutes.
First, we must check if the crontab file exists. This is located on /etc. Remember that all the files that are inside the /etc directory are managed by the superuser: root:
The last line of the crontab indicates also the user that is going to execute the file “register_each_2minutes.sh”.
Finally, configure the sh file starting with the header #!/bin/bash and the commands to execute our purpose. Check the output in the file mentioned: