- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script to ftp file from HP-UX server to a windows ...
Operating System - HP-UX
1755669
Members
4571
Online
108837
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО02-19-2004 04:56 AM
тАО02-19-2004 04:56 AM
Re: script to ftp file from HP-UX server to a windows 2003 server
Mark, good idea.
My last attempt included the following:
In the unix script, I determined the file and then uncompressed the file on the unix server. Setting the variable again for just the uncompressed file name. Then the ftp portion of the script executed. It ran, but the total kb is different on the windows server than what is displayed on unix. I will look into your suggestion. I'm going to make a couple more tests but it looks like it is working. Like I said, I've just got to verify the ftp'd file size is correct. Anyway, I really appreciate yours and everyone's help. In researching, looks like the windows command to compress is compact? I'll give that a try. I want to automate all this.
My last attempt included the following:
In the unix script, I determined the file and then uncompressed the file on the unix server. Setting the variable again for just the uncompressed file name. Then the ftp portion of the script executed. It ran, but the total kb is different on the windows server than what is displayed on unix. I will look into your suggestion. I'm going to make a couple more tests but it looks like it is working. Like I said, I've just got to verify the ftp'd file size is correct. Anyway, I really appreciate yours and everyone's help. In researching, looks like the windows command to compress is compact? I'll give that a try. I want to automate all this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2004 05:43 AM
тАО02-19-2004 05:43 AM
Re: script to ftp file from HP-UX server to a windows 2003 server
I wouldn't worry too awful much about filesizes matching exactly.
If you are dealing with text files, then you may need to do a "ux2dos" on the UNIX file first. If you are dealing with compressed files, like .Z or .gz files, then you may not need to uncompress them before sending them to Windows .. many of the Windows zip utilities will also read .Z and .gz files with no problem.
Don't forget to hand out points to all those people you are wishing to express your gratitude for. :)
If you are dealing with text files, then you may need to do a "ux2dos" on the UNIX file first. If you are dealing with compressed files, like .Z or .gz files, then you may not need to uncompress them before sending them to Windows .. many of the Windows zip utilities will also read .Z and .gz files with no problem.
Don't forget to hand out points to all those people you are wishing to express your gratitude for. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-19-2004 10:02 AM
тАО02-19-2004 10:02 AM
Re: script to ftp file from HP-UX server to a windows 2003 server
Okay Kathy, I'll post the version of ftpput.pl that I typically use.
1) In your home directory (or the sender's home directory) create a file called .netrc with 600 (rw-------) permissions owned by the sender.
Have an entry like this:
machine remotehost login cstephen password topsecret account mostsecret
The account data is required on boxes which add an extra layer of authentication. You probably won't need that. Man .netrc for details.
2) cd to the desired directory on the local host
3) ftpput.pl -h remotehost -B -d dirname -t 4 -v file1 file2 file3
STAT=${?}
That will ftp to remotehost, attempt to login as the current user using password and account data in .netrc. -B specifies binary xfers, -d dirname cd's to dirname on the remote host, -t 4 tells it to try to send a file up to 4 times before giving up. -v set verbose. Finally, file1 file2, file3 are sent. You don't have to check file sizes or do checksums, if ${?} is zero then everything (login,hostname,xfers) was okey-dokey.
Invoke this puppy as ftpput.pl -u for full usage.
1) In your home directory (or the sender's home directory) create a file called .netrc with 600 (rw-------) permissions owned by the sender.
Have an entry like this:
machine remotehost login cstephen password topsecret account mostsecret
The account data is required on boxes which add an extra layer of authentication. You probably won't need that. Man .netrc for details.
2) cd to the desired directory on the local host
3) ftpput.pl -h remotehost -B -d dirname -t 4 -v file1 file2 file3
STAT=${?}
That will ftp to remotehost, attempt to login as the current user using password and account data in .netrc. -B specifies binary xfers, -d dirname cd's to dirname on the remote host, -t 4 tells it to try to send a file up to 4 times before giving up. -v set verbose. Finally, file1 file2, file3 are sent. You don't have to check file sizes or do checksums, if ${?} is zero then everything (login,hostname,xfers) was okey-dokey.
Invoke this puppy as ftpput.pl -u for full usage.
If it ain't broke, I can fix that.
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP