- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- The system process
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
06-27-2005 04:53 PM
06-27-2005 04:53 PM
1. how to make sure the file has been rcp to another hosts eg. if the network has problem , then the file will not be rcp to host B to avoid to be removed ;
2. if the other side have the same file name , how to make sure the file will not be overwrite eg. add prefix to the file .
could suggest what is the best method ? thx
2. if the other side have the same file name , how to make sure the file will not be overwrite eg. add prefix to the file .
could suggest what is the best method ? thx
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2005 05:00 PM
06-27-2005 05:00 PM
Re: The system process
1. look for the return code of rcp, if rcp fails you would have return code set to 1 otherwise 0.
2. Before you do a rcp, do a remsh to list the files on the remote server say file1 is the file you want to copy to hostB then make sure that the file doesnt exist by doing
remsh hostB ls file1
if you see something like file not found then go a head with normal rcp otherwise replace the destination file with someother filename while doing rcp
Cheers
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2005 09:18 PM
06-27-2005 09:18 PM
Re: The system process
Pls check for cron log and syslog files for outcome of cron job and errors if any.
good luck
Mahesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2005 09:35 PM
06-27-2005 09:35 PM
Re: The system process
Just use a couple of If - then - else in your script to check the things like return codes and presence/absence of files before doing anything else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2005 06:16 PM
06-28-2005 06:16 PM
Re: The system process
the requirement as below,
Host A rcp all the files ( /tmp ) to host B , if the file is successfully rcp to host B , it will move to /tmp/edp , if it is fail to copy ( may be due to the failure of network or the file name is exist at host B ) , then don't move the file ( keep the file to make sure it will be rcp to host B ) , all file rcp to host B add a ".txt" extension ( eg. the original file name is oracl the new file name should be oracl.txt ) , could someone can help ? thx in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 12:54 AM
06-29-2005 12:54 AM
Re: The system process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 01:25 AM
06-29-2005 01:25 AM
SolutionHi ,
Pls use the below script as model , and you can customise to include all your options.
#!/bin/sh
remsh Host-A -n "ls -ld /tmp" >/dev/null 2>&1
if [ $? -ne 0 ]
then
echo "Connection problem to Host- B.Exiting !!"
exit 1
fi
chk=no
chk=`remsh Host-B -n "if [ -f /tmp/file]; then echo "yes";fi`
if [ "$chk" = "no" ]
then
echo "File=file Is not copied to /tmp"
else
remsh Host-B -n "mv /tmp/file /tmp/ebp/file.txt"
echo "File is Moved to /tmp/edp"
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2005 08:46 PM
06-29-2005 08:46 PM
Re: The system process
I have a problem , when run the remsh , it pop the "Permission denied." , I know if I update /etc/hosts.equiv , it can remsh to hosts B , but except this method , is there other method that can also run remsh ? thx