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 Powered by Powered by Google
 
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-23-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by sam99 View Post
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.
Either you or I have the wrong end of the stick entirely. If you want to copy files using scp then do so, there is no need for any sleeps or strange echos etc.

usage: scp from to

man scp

eg to get a file

scp someuser@somemachine:somefile somedestination

to put a file

scp somefile someuser@somemachine:somepath

and you can use wildcards if you are careful and escape them if required.
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 06:53 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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