LinuxQuestions.org
Help answer threads with 0 replies.
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 11-20-2017, 05:26 AM   #1
Prashanth Dheram
LQ Newbie
 
Registered: Nov 2017
Posts: 4

Rep: Reputation: Disabled
ftp to an ip directly from crontab


I have a crontab entry which runs ftp to a destination ip address. However there is no script or source or destination directory details. Can anyone please help me with the name and location of the file where these details will be present?
 
Old 11-20-2017, 07:29 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,810

Rep: Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003Reputation: 8003
Quote:
Originally Posted by Prashanth Dheram View Post
I have a crontab entry which runs ftp to a destination ip address. However there is no script or source or destination directory details. Can anyone please help me with the name and location of the file where these details will be present?
No, and there is absolutely NO WAY anyone, anywhere, can answer this question. How is anyone going to know the source, destination, IP address, or ANYTHING about two random FTP servers?

You say there is no script...then how, exactly, does the FTP job run? What does that crontab entry consist of? Either the FTP details are in the crontab line, or they're in a script. No where else they can really be.
 
Old 11-20-2017, 11:41 AM   #3
GentleThotSeaMonkey
Member
 
Registered: Dec 2016
Posts: 338
Blog Entries: 4

Rep: Reputation: 128Reputation: 128
Welcome to this site, but someone like you should use Google.com instead.
Sorry, I coulda"t figure out how to copy&paste with M$Win10 tablet, but
Google shows examples of $variables in script, and .netrc
Does your ftp support .netrc? We hope you succeed with the needful.
 
1 members found this post helpful.
Old 11-20-2017, 12:13 PM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,885
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Quote:
Originally Posted by Prashanth Dheram View Post
I have a crontab entry which runs ftp to a destination ip address. However there is no script or source or destination directory details. Can anyone please help me with the name and location of the file where these details will be present?
Hi Prashanth Dheram and welcome to LQ.

Perhaps you should post your crontab entry and refer to where you see the FTP. To help enhance your question, consider reviewing the LQ Site FAQ

Other members please remember this is a new user, while it is true they have not provided enough information, our policy is to refer them to any of the many helpful links. For instance those in LQ signatures, if they happen to contain helpful links. Comments about non-related technology are not on topic. Abbreviations or text speak are discouraged in LQ because they can cause misunderstandings.

If there are any concerns or questions about this guidance, please contact myself or the moderators directly.

Last edited by rtmistler; 11-20-2017 at 12:15 PM.
 
Old 11-20-2017, 07:02 PM   #5
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
You can put the FTP command in a crontab, but you haven't much chance of controlling it unless you have a script to tell it what to do and where to put data.

Why not write a script and get your crontab to run the script directly?
 
Old 11-20-2017, 10:20 PM   #6
giis
Member
 
Registered: Nov 2013
Location: Third Rock from Moon
Distribution: RPM/DEB based and LFS
Posts: 73

Rep: Reputation: Disabled
Quote:
Originally Posted by Prashanth Dheram View Post
I have a crontab entry which runs ftp to a destination ip address. However there is no script or source or destination directory details. Can anyone please help me with the name and location of the file where these details will be present?
Post your crontab entries here along with output of
Quote:
ls -la /path/to/script/location
May be you are looking to wrong crontab user file?
 
Old 11-22-2017, 06:43 AM   #7
Prashanth Dheram
LQ Newbie
 
Registered: Nov 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
No, and there is absolutely NO WAY anyone, anywhere, can answer this question. How is anyone going to know the source, destination, IP address, or ANYTHING about two random FTP servers?

You say there is no script...then how, exactly, does the FTP job run? What does that crontab entry consist of? Either the FTP details are in the crontab line, or they're in a script. No where else they can really be.
I have found the answer to my question. The ftp configuration is present in .netrc file. I just needed to know how can a ftp job be implemented without a script since there was no script in my system. I just found a crontab entry with ftp to the destination ip.

Last edited by Prashanth Dheram; 11-22-2017 at 06:50 AM.
 
Old 11-22-2017, 06:44 AM   #8
Prashanth Dheram
LQ Newbie
 
Registered: Nov 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by GentleThotSeaMonkey View Post
Welcome to this site, but someone like you should use Google.com instead.
Sorry, I coulda"t figure out how to copy&paste with M$Win10 tablet, but
Google shows examples of $variables in script, and .netrc
Does your ftp support .netrc? We hope you succeed with the needful.
After doing a lot of research on google, I have found some details regarding .netrc file and it worked for me. Thanks!!
 
Old 11-22-2017, 06:48 AM   #9
Prashanth Dheram
LQ Newbie
 
Registered: Nov 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by JeremyBoden View Post
You can put the FTP command in a crontab, but you haven't much chance of controlling it unless you have a script to tell it what to do and where to put data.

Why not write a script and get your crontab to run the script directly?
ftp in crontab can be controlled by .netrc file in the user's home directory. I needed this information because I had to debug en existing ftp job and I didn't have the details regarding source and destination. I could only see in crontab that there is an ftp to destination ip.
 
Old 11-22-2017, 11:55 PM   #10
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I'm glad you got it working.
 
  


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
ftp a file directly from a 3-rd machine? tramni1980 Slackware 9 06-27-2013 06:36 PM
cron job fails, but command in crontab succeeds when directly entered rmunsch Linux - Server 2 02-16-2009 05:27 PM
Watch movies directly from ftp or smb connection with KMPlayer chief_officer Linux - General 3 02-28-2007 12:56 PM
Saving/opening files directly on/from FTP server saurya_s Linux - Software 0 02-03-2004 02:54 PM
Cannot directly access files from server via browser on FTP MasterC Linux - Networking 10 01-15-2003 03:28 PM

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

All times are GMT -5. The time now is 03:11 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