- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Simple Automated FTP Scripts
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 01:53 PM
03-12-2001 01:53 PM
Simple Automated FTP Scripts
I am new to Unix scripting, and I admit this is above my abilities (I am an expert from the NT world). However, I am capable of modifying any current script to work.
I am humbly hoping there is a current good script out there or a good utility to accomplish this task.
Thanks Everyone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2001 12:54 PM
03-14-2001 12:54 PM
Re: Simple Automated FTP Scripts
You could write a script to login a try and get the empty completion file -
If it fails then the file isn't completed.
-
If it succeds then delete the empty completion file and download the other file.
I could give you some example scripts if you need them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2001 01:08 PM
03-14-2001 01:08 PM
Re: Simple Automated FTP Scripts
'if the file exists -f or if the file exists and the size is greater than zero -s '
you can do this in a POSIX shell with a:
test -f /dir/filename or test -s /dir/filename
..OR you could do it with a conditional statment
[[ -f /dir/filename ]] or [[ -s /dir/filename]]
then incorporte the auto ftp statements..
Just something to get you started,
/rcw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2001 11:00 AM
03-15-2001 11:00 AM
Re: Simple Automated FTP Scripts
the easiest way, to be sure that the file is finished, is to rename it after the transmission in your ftp script
ftp> put myfile.intransmission
ftp> rename myfile.intransmission myfile.completed
To have automatic login, check out ".netrc" file.
When you receive the file, you should make a local copy of it, so the next transfer can do a "cmp" to check if it is diffrent.
Just a few guidelines.
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2001 08:24 AM
03-16-2001 08:24 AM
Re: Simple Automated FTP Scripts
Attached is a copy of a script that I've been using to ftp files back and fourth from our servers. It works just fine for the actual portion of doing the ftp for you from a shell script, however it lacks any security features.
Usage: ftp_batch hostname userid passwd get|put src_file dest_file
Looks like Rita's post will take care of determining the status of the file and this will give you the ability to do the ftp. Call this script from your main script and setup that script to run via cron (at in the MS world) and you should be able to accomplish your goal.
- Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2001 05:26 AM
03-18-2001 05:26 AM
Re: Simple Automated FTP Scripts
A simle way to check if build has finished is to get the system time and compare it with the file time.
HTP
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2001 05:30 AM
03-18-2001 05:30 AM
Re: Simple Automated FTP Scripts
Ftp script:-
Remember to exit here if file is not complete.
ftp -n
user
prompt
put
quit
End_of_Ftp
HTH
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2001 10:43 AM
03-18-2001 10:43 AM
Re: Simple Automated FTP Scripts
If remsh is allowed attached script works fine.
You should keep it in crontab for running on daily basis.
Cheers...
Satish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2001 12:56 PM
03-18-2001 12:56 PM
Re: Simple Automated FTP Scripts
Bill Hassell, sysadmin