LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-05-2013, 10:17 AM   #1
benygr
LQ Newbie
 
Registered: Jul 2013
Posts: 11

Rep: Reputation: Disabled
Is a Cron or Script trouble?


Hi
I did a bash script for download internet files to my FTP place... but when cron start to run those files if by any chance the conexion stop, they start to down again since 0, making many copies from the same file doing the job endless.
however when i run the script alone that don't happend, just when i run the cron
Could somebody give me any idea?
 
Old 07-05-2013, 10:29 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,657

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by benygr View Post
Hi
I did a bash script for download internet files to my FTP place... but when cron start to run those files if by any chance the conexion stop, they start to down again since 0, making many copies from the same file doing the job endless.
however when i run the script alone that don't happend, just when i run the cron
Could somebody give me any idea?
No, not since you don't post the script, or give us any details.
 
Old 07-05-2013, 10:36 AM   #3
benygr
LQ Newbie
 
Registered: Jul 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
sorry here there are a pice to script

Quote:
Originally Posted by TB0ne View Post
No, not since you don't post the script, or give us any details.
#Avira Actualizacion
cd /FTP/Antivirus/Windows/Avira/Actualizacion/
rm *
wget -t 22 --waitretry=48 --wait=33 --random-wait http://ftp.sld.cu/pub/antivirus/avir...fusebundle.zip


#kav
#cd /FTP/Antivirus/Windows/Kaspersky\ 6.04/Actualizacion/
#rm *
#wget -t 22 --waitretry=48 --wait=33 --random-wait ftp://ftp.sld.cu/antivirus/avp/actua...130529.tar.bz2
#wget -t 22 --waitretry=48 --wait=33 --random-wait ftp://ftp.sld.cu/pub/antivirus/avp/a...386-weekly.zip
#wget -t 22 --waitretry=48 --wait=33 --random-wait ftp://ftp.sld.cu/pub/antivirus/avp/a...i386-cumul.zip
 
Old 07-05-2013, 10:43 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,657

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by benygr View Post
#Avira Actualizacion
cd /FTP/Antivirus/Windows/Avira/Actualizacion/
rm *
wget -t 22 --waitretry=48 --wait=33 --random-wait http://ftp.sld.cu/pub/antivirus/avir...fusebundle.zip
That is NOT the whole script, and most of what you posted is commented out. Unless you post details, there's nothing we can tell you.

I will say, based on the few lines that you did post, is that the "rm *" is VERY risky...you should always try to use a qualified path, like "rm /some/path/*" in scripts. Also, you don't post any of the file name(s) that the script is outputting, or even what version/distro of Linux you're using. Again, unless you provide details, there is nothing we can help you with.
 
Old 07-05-2013, 11:00 AM   #5
benygr
LQ Newbie
 
Registered: Jul 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
ok

Quote:
Originally Posted by TB0ne View Post
That is NOT the whole script, and most of what you posted is commented out. Unless you post details, there's nothing we can tell you.

I will say, based on the few lines that you did post, is that the "rm *" is VERY risky...you should always try to use a qualified path, like "rm /some/path/*" in scripts. Also, you don't post any of the file name(s) that the script is outputting, or even what version/distro of Linux you're using. Again, unless you provide details, there is nothing we can help you with.

well... rm* i use for delete the before file completly, so it don't answer me and copy one new... this script save the file on /FTP/Antivirus/Windows/Avira/Actualizacion/
i work with debian 7 wheezy... i really don't know what other details i could give for, please, if you think that i most give more details, just ask me about,.... i would like so much you could help me
 
Old 07-05-2013, 11:11 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,657

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by benygr View Post
well... rm* i use for delete the before file completly, so it don't answer me and copy one new... this script save the file on /FTP/Antivirus/Windows/Avira/Actualizacion/
Ok...again, an "rm *" that's unqualified is risky. Use the entire path instead.
Quote:
i work with debian 7 wheezy... i really don't know what other details i could give for, please, if you think that i most give more details, just ask me about,.... i would like so much you could help me
You could POST THE SCRIPT, like we've asked you to SEVERAL TIMES NOW. You could also answer other questions, like:
What are the file name(s) that the script is outputting? You said it makes 'many copies'...what are they called?
Is this running as root/in roots CRON, or as your regular user/cron?
Permissions on the directories?
 
Old 07-05-2013, 11:39 AM   #7
benygr
LQ Newbie
 
Registered: Jul 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Ok...again, an "rm *" that's unqualified is risky. Use the entire path instead.

You could POST THE SCRIPT, like we've asked you to SEVERAL TIMES NOW. You could also answer other questions, like:
What are the file name(s) that the script is outputting? You said it makes 'many copies'...what are they called?
Is this running as root/in roots CRON, or as your regular user/cron?
Permissions on the directories?
Script's File name: Antivirus.ssh
one of the file who download is Avira Antivirus(i in this script download many antivirus and others programs), and when it make many copies first name vdf_fusebundle.zip, then vdf_fusebundle.zip.1, then vdf_fusebundle.zip.2 ... till i don't stop the cron or conexion down completly...
is the trouble, when I run the cron(as root) happend that but when i just run the script it don't happend... i woulkd like use the cron for forget all the afternoon to have to run the scrpit
 
Old 07-05-2013, 01:38 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,657

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by benygr View Post
Script's File name: Antivirus.ssh
one of the file who download is Avira Antivirus(i in this script download many antivirus and others programs), and when it make many copies first name vdf_fusebundle.zip, then vdf_fusebundle.zip.1, then vdf_fusebundle.zip.2 ... till i don't stop the cron or conexion down completly...
is the trouble, when I run the cron(as root) happend that but when i just run the script it don't happend... i woulkd like use the cron for forget all the afternoon to have to run the scrpit
Ok...so AGAIN...POST THE SCRIPT

Telling us the name is pointless. Unless you are going to answer questions you've been asked and post the script, there is no point in posting. You've been asked for details SEVERAL TIMES now, and have yet to provide them. You've been asked for the script, but don't provide it. We've had to ask over and over to get ANY information from you. So, either post COMPLETE details and the script, or figure it out yourself...without information, no one, anywhere, can help you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cron appears to be messed up (E: cron: subprocess post-installation script returned e bujutsukai Linux - Newbie 1 07-24-2008 03:39 AM
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
bash script causes trouble with cron Suinatsa Programming 10 06-14-2006 03:20 AM
Trouble with perl script in Cron job thack111 Linux - General 7 11-25-2004 02:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration