First off, I know this is sort of a rehash of similar questions that have been asked in other closed threads, but I haven't been able to figure out how to apply the answers provided in those threads to my scenario and make it work.
I am working on a script in KSH on AIX 5.1 that will do a bulk unload of a DB2 table to a directory on the AIX server, then it should gzip the file and SCP it to a directory on a RHEL server and then remove the file from the AIX server (since space is very limited on the AIX server and some of these bulk unloads will be very large.)
The problem I'm running into is that even if the SCP fails (I can force it to fail by specifying an invalid server name as the lzserver) the files are still being removed.
In the other threads on the topic, it showed putting the logic for testing the return code from SCP into a loop, but I don't understand how exactly to make that work. Also, I wasn't clear if the loop was something that would apply to my scenario or if it was particular to the other thread where it was dealing with finding log files and moving them.
i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Need assistance
I have ssh keys exchanged between servers for user ZID
ssh works without password between ZID . "ssh SERVER A to SERVER B works"
I have a property file on SERVER A which is owned by root and I need to transfer the file changing into ZID user and transfer to SERVER B
... (7 Replies)
Hi All,
I have a requirement to check if the merge of files is successful or not. The script to merge files goes like this,
cat Rewards_Header Rewards_Siebel_Notif_temp Rewards_Siebel_Remind105_temp > Rewards_Siebel
Sometimes, the file Rewards_Siebel misses records from file... (5 Replies)
Hi,
I'm new to Linux. I would like to know how to scp a group of files. I have the below command, but it asks for remote password while sending each file. Is there a way to send all files (identified by - $ ls | grep '.*hrs0314a.*' | xargs -I {} grep -l '.*35663.*' {}) in one go?
$ ls |... (6 Replies)
All,
I am using a for loop to SCP a bunch of files in a directory. I am having it then drop a .ready file name. Is there a way to check for the success of all iterations and then email upon fail or success?
Example of part of my script:
for file in $ORIGLOC/*
do
] &&... (2 Replies)
Hi all
Ive been given the task to write a script that tests that certain link files work, i.e. the physical directory the link points too, is actually there.
Now, before I go down the route of ls -l | awk ...... or using test or find, is there a far more simpler command that I can use ?
... (2 Replies)
Hi ,
I am doing SCP for copying log files from different server(around 24 server)
I need to copy these bulk logfiles every 15 min.
How can i do multiple SCP at the same time?
My current code is like this
scp $CUSTCARE_USER@$CUSTCARE_SERVER:$CUSTCARE_HOME/$CUSTCARE_LOG.*... (2 Replies)
Hi,
We have an interesting problem with F-Secure SSH (v 3.1.0) running on HP-UX. It seems that when scp or sftp commands are issued they are successful but it counts as a 'strike' against the target user locking the account out after 3 attempts.
When the user is re-enabled in SAM - it reports... (4 Replies)
I have a shell script which GETS a file, but I only want to run this script if $FILE exists on the remote host, don't know correct syntax.....please help
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
bin
get $FILE
rename export.prn export.prn.$TIMESTAMP
!cat... (0 Replies)