is there any format to make .sh file?? because i wrte only rsync command.
now location of the file is C:\cygwin64\bin\backup.sh |
for permission : right click on the file -> properties -> security->to change the permission clickd on edit and tick the box of full control allow .. is it okay???
thank u so much for reply |
That is a simple text file, you need to list your commands line by line into it. You can read some tutorials about bash scripts to get a better view.
Usually it begins with: Code:
#!/bin/bash For permission you need to use the tools of cygwin, not the tools of windows. That is the command chmod and chown (see man pages about usage). For example you will set execute rights by: chmod +x <filename> |
is there any format to make .sh file ? because i wrte only and only rsync command
for permission: right click on the file -> properties -> security-> edit -> tick the box of full contol allow is it okay? now the location of file is: C:\cygwin64\bin\backup.sh |
?
You have already asked it and got an answer. I think you have another problem. Please post what have you tried and what's happened. |
okay i wrte command : chmod +x /cygdrive/c/cygwin64/bin/backup.sh in cygwin terminal.
and backup.sh file contents is like: #!/bin/bash rsync -av "/cygdrive/c/vjtest" "root@192.168.1.149:/home/backup" |
sorry.. by mistake i posted again..
|
how to run that file in cron tab??
|
please help me.. its urgent! today is deadline..:(
|
crontab -e
is used to edit a cron see man crontab and man cron about details |
i wrote crontab -e in cygwin terminal
and then i wrte: */5 * * * * / /cygdrive/c/cygwin64/bin/backup.sh save and quit checked list by using 'crontab -l' but after 5 mints i checked, there is no 'vjtest' folder in /home/backup |
I don't know if cron was running on your host.
http://www.davidjnice.com/cygwin_cron_service.html http://stackoverflow.com/questions/7...win-on-windows |
(duplicate)
|
Quote:
|
okay.. still ouput is not coming.
backup.sh file contents is like: #!/bin/bash rsync -av "/cygdrive/c/vjtest" "root@192.168.1.149:/home/backup" above rsync command if i type manually in cygwin terminal , it runs successfully how this possible? |
All times are GMT -5. The time now is 02:31 AM. |