If you have a requirement to put files from one machine to a remote machine where the client in which you are connecting might disconnect after some time out. In this case you would want the file transfer to take place in background ( in server ).Here is a small shell script which can put files in background. This is for solaris.
#!/bin/sh
HOST='remote machine ip'
USER='remote machine user name'
PASSWD='remote machine user password'ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
prompt off
cd /data1/oracle/rman -- source directory where your files are present
mput *
quit
END_SCRIPT
exit 0
You can check whether the process is running as shown below.
-bash-3.00$ ps -ef | grep scriptname
0 comments:
Post a Comment