Question

For Linux Bash Script: Show the crontab file entry that would run the script from the...

For Linux Bash Script:

Show the crontab file entry that would run the script from the last question, every Monday, Wednesday, and Friday at 5:30 AM.  Assume the name of the script is fileCleanup.sh and that it is located in the ~/script directory.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

the crontab command has following format

* * * * * /path/to/script

here the first * indicate the every minute(0-59)

second * indicate the every hour (0-23)

third * indicate every day of the month(0-31)

fourth * indicate the every month of year(0-12)

fifth * indicate the every day of the week (0-7)

/path/to/script inidicte the path to the script

command is

30 05 * * 1,3,5 ~/script/fileCleanup.sh

here 30 indicate the minute of fifthe hour and 1,3,5 indicate the days of the week which 1-monday , 3-wednesday and 5-friday and ~/script/fileCleanup.sh is path to the file

Add a comment
Know the answer?
Add Answer to:
For Linux Bash Script: Show the crontab file entry that would run the script from the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command...

    LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command line arguments and does NOT use the read command. I will give you no credit if your bash script includes a read command. Also, you need to have at least one for..in loop in your code even if there may be other ways to do this problem. The script will go through a list of entries in the current directory (do not process subdirectories):...

  • 1. Install the supplied bash script on the Kali Linux VM BASH filename :ipLAN In text...

    1. Install the supplied bash script on the Kali Linux VM BASH filename :ipLAN In text editor looks like this #!/bin/bash is_alive_ping() {    ping -c 1 $1 >/dev/null 2 >&1    [ $? -eq 0 ] && echo Node with IP: $1 is UP. } for i in 192.168.1.{1..255} do is_alive_ping $1 & disown done QUESTION: Install the supplied bash script on the Kali Linux VM **NOte how do i install the above script in kali ,when i am...

  • Problem 1 Write a BASH script to create a user account from the Linux system on...

    Problem 1 Write a BASH script to create a user account from the Linux system on which your script is run. The script should process two positional parameters. First positional parameter is supposed to be a string with a user name (e.g., user_name) Second positional parameter is supposed to be a string with a user password (e.g., user_password) In your script: Check if two positional parameters were passed to your script when it was invoked If NOT, print an appropriate...

  • Add a crontab entry that will run the who command at 5:50 p.m. every weekday (Monday...

    Add a crontab entry that will run the who command at 5:50 p.m. every weekday (Monday through Friday) and send the output of the command to the /home/student/who-there file. Then, execute the command that will allow you to view the current user’s crontab file.

  • Hi I beed this assignment to be in a script in linux from codio. Can someone...

    Hi I beed this assignment to be in a script in linux from codio. Can someone please help me step by step thank you. Overview: In this milestone, you will demonstrate your ability to create a basic script in Linux. Review the Final Project Guidelines and Rubric document to see how this milestone will prepare you for the scripting portion of the project. You will perform this milestone in Codio in the unit called “Milestone 2: Scripting.” You will create...

  • Create a bash script to do the following on your CentOS6 VM. To back up your...

    Create a bash script to do the following on your CentOS6 VM. To back up your home folder using tar command daily. Use gzip as the compression for tar (z option). – 10pts Hint: Make sure you exclude the tar file itself from the backup. The script should name the tar file backupYYYYMMDD.tar.gz -10 pts The script should keep the last seven days of backup files and delete backup files older than seven days. -10 pts The script should check...

  • For each command give me the ENTIRE COMMAND SEQUENCE. If I ask you 'What command would...

    For each command give me the ENTIRE COMMAND SEQUENCE. If I ask you 'What command would I use to move the file one.txt to the parent directory and rename it to two.txt?", the answer is NOT 'mv'. That is only part of the command. 16. What command could I run to determine whether the ssh daemon is listening? With OpenSSH installed and running, the result should show that ssh/port 22 as "listening.' (5 pts) 17. Create a crontab entry that...

  • (In Linux) 1. Create a file to write to from your script and save it as...

    (In Linux) 1. Create a file to write to from your script and save it as “.txt”. 2. Write the following information to the file that you created in Step 1: Today's date Your full name Your student ID The name of your course What directory you are in File permissions of the file that you created that allow everyone to read, write, and execute The long list of files in your current directory, providing all items and their process...

  • write a script which will list the contents of the /dev directory. Then have the script...

    write a script which will list the contents of the /dev directory. Then have the script create a file to redirect the output from the file to a new directory called Devsample in the /home directoy which will only display first 10 lines of the directory and last 5 lines of the directory. Show the output of the Devsample file. ( LINUX SCRIPT)

  • In the Ubuntu Terminal Create a script to copy DHCP logs to a separate file Create...

    In the Ubuntu Terminal Create a script to copy DHCP logs to a separate file Create a directory ~/scripts Create a directory ~/logs Create a script in ~/scripts, name it dhcp-activity.sh Include a comment that describes the script Print to the terminal “Copying DHCP Log Activity” Copy activity from dhclient to a file called dhclient.log in the ~/logs directory When you are finished, show the instructor: Cat dhcp-activity.sh Bash dhcp-activity.sh Cat dhclient.log

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT