- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- cron jobs
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
07-10-2006 04:17 AM
07-10-2006 04:17 AM
cron jobs
What i want is a simple script which would transfer the file and over write the existing one in that particular folder. Now, should i put an ftp clause to do it.
Suggestions please??
Thanks
- Tags:
- crontab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2006 04:31 AM
07-10-2006 04:31 AM
Re: cron jobs
#!/usr/bin/sh
#Set vars in the following block
host=foo
username=user2
password=hello
dir_src=/home/user1
dir_dest=/
filename=myfile.text
ftp -n << _EOF_
open ${host}
user ${username} ${password}
put ${dir_src}/${filename} ${dir_dest}
bye
_EOF_
Remember that ${dir_dest} is based on the directory structure displayed by FTP.
PCS
- Tags:
- ftp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2006 04:33 AM
07-10-2006 04:33 AM
Re: cron jobs
The simplest approach might be to 'rcp' the file that you want copied:
# rcp -p /var/tmp/myfile otherhost:/var/tmp/myfile
You will need to establish a 'hosts.equiv' or '.rhosts' file on both servers. See the manpages for 'hosts-equiv(4)' for more information on this.
Setup an appropriate crontask and you should be done.
Regards!
...JRF...
- Tags:
- rcp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2006 04:41 AM
07-10-2006 04:41 AM
Re: cron jobs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2006 04:46 AM
07-10-2006 04:46 AM
Re: cron jobs
- Tags:
- CIFS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2006 05:38 AM
07-10-2006 05:38 AM
Re: cron jobs
You have many options for how to transfer the file. A couple more to consider:
email as an attachment
======================
( echo "You will find myfile.gz attached."
uuencode myfile.gz myfile.gz ) | mailx -m -s "[$(date +%m\/%d\/%y)] myfile.gz" my@email.addr
scp from the Windows box
(if you have sshd running under HP-UX)
===========================================
1. Generate a public/private key pair.
2. scp user2@hpux01:~/myfile.gz .
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2006 07:35 AM
07-10-2006 07:35 AM
Re: cron jobs
Secure Shell (SSH or sftp and scp) do not exist in Windows so you'll have to add an SSH package to enable encrypted data transfers.
Bill Hassell, sysadmin