Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
# 59 23 * * 1 sh /rsync01.sh
# 59 23 * * 2 sh /rsync02.sh
# 59 23 * * 3 sh /rsync03.sh
# 59 23 * * 4 sh /rsync04.sh
# 59 23 * * 5 sh /rsync05.sh
# 59 23 * * 6 sh /rsync06.sh
# 59 23 * * 0 sh /rsync07.sh 
* * * * 6 sh /z_Saturday.sh
* * * * 6 sh /z_Saturday1.sh
* * * * 6 sh /z_Saturday2.sh
* * * * 1-5 sh /up_to_0200h.sh
* * * * 1-5 sh /up_to_0300h.sh
* * * * 1-5 sh /up_to_0400h.sh
* * * * 1-5 sh /up_to_0500h.sh
* * * * 1-5 sh /up_to_0600h.sh
* * * * 1-5 sh /up_to_0630h.sh
* * * * 1-5 sh /up_to_0700h.sh
* * * * 1-5 sh /up_to_0730h.sh
* * * * 1-5 sh /after_0730h.sh**

My boss wants that i copy the shell script and paste the data in a new script. but I don't know how to search this file and how to edit it please guide me.

share|improve this question
    
cd / and ls command will list your files. –  karthick87 Jan 29 '13 at 14:01
add comment

2 Answers 2

  • Those scripts are in the ROOT directory. 1st time I see this done like this and it feels ... wrong. Plese put them in /bin or /usr/bin. You can use cd / and ls -l to show you a list of those files. Editing is done with vi or another command line editor.

  • This file you posted is the crontab file and is edited with crontab -e but you need to be logged in as the user this crontab belongs to. If that is root you need root access to be able to edit this.

  • The lines with a # in front are commented and not executed.

share|improve this answer
add comment

You have several options to locate a file:

  1. using find: find / -name 'the_name_of_the_file' (You are allowed to use * as well.)
  2. using locate: first build the database with: sudo updatedb, after that you can use locate the_name_of_the_file
  3. using whereis: whereis the_name_of_my_script (Note that the script must be in $PATH.)
  4. using which: which the_name_of_my_script (Here also it must be in $PATH)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.