9. Using crontab (crontab -e) is another way we can schedule tasks in Linux. Create three crontab...
Question:
9. Using crontab (crontab -e) is another way we can schedule tasks in Linux. Create three crontab entries that will Run the file /home/yourusernamegoeshere/simple.sh (e.g., /home/patrick.simple.sh):
At 5:55PM on the 2nd day of every month
Every day at 3PM
Every Wednesday at 5:01AM
(Check Your Work: If you would like to test your understanding of crontab entries, schedule simple.sh to run at a sooner time in the future. Wait then check the ~/Desktop/scriptran.txt file. If the simple.sh script ran at the time you set, that file should contain a timestamp for the time you set in crontab).
10. We can often combine two or more commands to work together and accomplish far more than either could individually. We've touched on grep previous, a very handy command to search content using regular expressions, but grep really shines when it works with other commands to parse data. Run the "sleep 3000" command then either pause the command or open a second terminal window. Now make a command which lists running processes and also uses grep to search the list of running processes such that it displays only the "sleep" process as the final result. Note: Do not use "pgrep" for this task.