The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unix Arithmatic operation issue , datatype issue thambi Shell Programming and Scripting 23 02-19-2008 07:19 AM
ftp issue ravi raj kumar Shell Programming and Scripting 5 02-06-2008 08:24 AM
awk issue on AIX ranj@chn Shell Programming and Scripting 1 07-04-2007 06:22 AM
Issue with rsh sriram.s AIX 5 07-03-2007 11:37 AM
FTP issue u263066 Shell Programming and Scripting 1 07-28-2006 06:18 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-19-2007
sam99 sam99 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 39
Reg: SCP issue

Hi ,

I am beginner in aix...

i am using the following command in my shell script to to copy the files from a secured server to my aix box...

/usr/local/bin/scp pickme@brad.wanted.com:../internal/mem_grp_details*

Should i use sleep command in my shell script for the script to copy the entire file....I found in some threads that sleep is not required...but for me the entire file is not copied without sleep...

Thanks is advance
sam
  #2 (permalink)  
Old 11-19-2007
s4g3's Avatar
s4g3 s4g3 is offline
Registered User
  
 

Join Date: Nov 2007
Location: India
Posts: 43
Whats the issue exactly?

Do you mean, only a part of your file is being copied to your system???

Also the Syntax of the command should be

/usr/local/bin/scp pickme@brad.wanted.com:../internal/mem_grp_details* .

Thanks
~Sage
  #3 (permalink)  
Old 11-19-2007
sam99 sam99 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 39
Hi ,
Thanks for the response...

I am using the extact syntax u specified...
But only a part of my file is copied from the secured server to my AIX box without sleep command..

Thanks,
Sam
  #4 (permalink)  
Old 11-19-2007
s4g3's Avatar
s4g3 s4g3 is offline
Registered User
  
 

Join Date: Nov 2007
Location: India
Posts: 43
If it really takes a very long time, chances are the ssh session will time out - try increasing the ssh timeout period on the server, if possible.

~Sage
  #5 (permalink)  
Old 11-19-2007
sam99 sam99 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 39
Hi ,

are u aware of the default time out period for scp and ssh session



Thanks ,
Sam
  #6 (permalink)  
Old 11-19-2007
s4g3's Avatar
s4g3 s4g3 is offline
Registered User
  
 

Join Date: Nov 2007
Location: India
Posts: 43
Not sure about AIX, but in most of the systems it is placed here

/etc/ssh/sshd_config

and with an entry called

ClientAliveInterval 300

Uncomment that line and it should be fine after restarting ssh

~Sage
  #7 (permalink)  
Old 11-19-2007
sam99 sam99 is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 39
Sage,

i dont have permission to edit the file....
So i thought of providing the sleep command to run the process.
but for me the size of the files will vary each time...i think i should first find the size of each file and use an if-else to find the sleep to be provided...

any comments...

thanks,
sam
Sponsored Links
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 02:54 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0