- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to call automaticly a script when a ftp file i...
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
04-10-2003 05:11 AM
04-10-2003 05:11 AM
How to call automaticly a script when a ftp file is recieved
For the moment, an application check every x minutes if a file is arrived. But there is too much users, and it takes times and load the machine.
How can we make an automated script when a file is recieved ? Without monitoring the log file, is there a more elegant solution ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2003 05:19 AM
04-10-2003 05:19 AM
Re: How to call automaticly a script when a ftp file is recieved
On UN*X systems, you have to use the file
"$HOME/.netrc"
and on Windows systems (client-wise speaking) there
is an command-line option for it.
/home/ftpuser
$HOME/.netrc
machine SERVER login USER password SECRET macdef init
cd /remote-dir
lcd /local-dir
prompt
binary
mput *.*
exexcutable_script
quit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2003 05:20 AM
04-10-2003 05:20 AM
Re: How to call automaticly a script when a ftp file is recieved
For example,
home/ftpuser
$HOME/.netrc
machine SERVER login USER password SECRET macdef init
cd /remote-dir
lcd /local-dir
prompt
binary
mput *.*
'Call-to-exexcutable_script_goes_here'
quit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2003 05:59 AM
04-10-2003 05:59 AM
Re: How to call automaticly a script when a ftp file is recieved
English is not my native language.
A remote user send a file via FTP on our server.
The server should process this file, so the server should detect that there is a new file and launch a script.
Does I wrong understand you ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2003 06:17 AM
04-10-2003 06:17 AM
Re: How to call automaticly a script when a ftp file is recieved
Put ftp in the sending machine and use the .netrc procedure provided above minus the 'Call-to-exexcutable_script_goes_here'.
Next line put a remsh to invoke the executable from the sending machine into the destination machine where you've just placed the files.
crontab
0 * * * * $HOME/transfer_script
From transfer machine:
Inside transfer_script:
#!/usr/bin/ksh
ftp destination machine
remsh destination machine executable
From destination machine:
.netrc
See above minus 'call...'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2005 05:25 PM
04-11-2005 05:25 PM
Re: How to call automaticly a script when a ftp file is recieved
I have written a korn shell automated script which only transfer files, but how do I transfer all the subdirectories in the filesystem.
Any help would be greatly appreciated. Below is my script.
#!/usr/bin/ksh
cd /FILESYSTEM_NAME
USER=root
PASS=1234
MACHINE=hostname
FTP=/usr/bin/ftp
$FTP -n $MACHINE <
user $USER $PASS
ascii
cd /FILESYSTEM_NAME
mput *
The above script works fine, but what do i need to do in the script so it transfer all the files in the subdirectories of /FILESYSTEM_NAME. Please advise