The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-15-2007
Knotty Knotty is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 11
ftp help

Does anyone know why I can't transfer a directory containing files from a remote directory to a local directory using psftp. If I take the file out of the directory but put it in the same place as where the directory was then I can get that file using psftp's get file command. Does not work for the directory (holding folder) though. Could it have something to do with permissions?
  #2 (permalink)  
Old 04-15-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,240
It has nothing to do with permissions. Transfer of directories is simply not supported.
  #3 (permalink)  
Old 04-15-2007
Knotty Knotty is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 11
So you're saying that if a directory(folder) is holding say 50 files in say ten sub-directories then the only option to transfer these files onto a local machine is to go into each sub-directory and transfer them from there?
Is there not a better way?
  #4 (permalink)  
Old 04-15-2007
awk awk is offline
Registered User
  
 

Join Date: Feb 2007
Posts: 134
If the remote system is a UNIX based one, have the directories/files tar'd into a single file, then compress the file (gzip is good) for faster transmission.

If you do this, be sure and use binary mode for transmission.

Then, on the destination machine, you would need to uncompress and untar the file.

tar is a common way to put multiple files in multiple directories into a single file for transmission or distribution.

If both systems supported pkzip, that would do it also.

But ftp is a "File transmission protocol", and while it will handle wildcards, it will not cross directories.
  #5 (permalink)  
Old 04-15-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,240
Quote:
Originally Posted by Knotty
So you're saying that if a directory(folder) is holding say 50 files in say ten sub-directories then the only option to transfer these files onto a local machine is to go into each sub-directory and transfer them from there?
Yes, that is exactly what I am saying. You could get more creative a write a coprocess script in ksh to mimic what you want be creating the directories when needed, I think Perderabo even posted such a script here ( serach for recursive ftp ). Some ftp clients also do this.

If you have expect installed, have a look at the rftp example that comes with expect. You'll find it in the same directory as the expect binary.
  #6 (permalink)  
Old 04-15-2007
Knotty Knotty is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 11
Thumbs up

Thanks reborg and AWK for your replies. I did not know about tar. This does the trick for me. I gathered them together with tar and zipped them up with gzip. Transfered without any fuss.

Everyday ye learn somthing knew eh!
Cheers again
  #7 (permalink)  
Old 04-23-2007
skywalker850i skywalker850i is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 17
Smile ftp on solaris 10

Hi guys,

Since we are talking about ftp. I am trying to set up an ftp guest account on solaris 10. The account can not "cd .." out of the directory but only when the user is part of the guest group. Thats works fine but, The ftp client cann't see any files because the command "dir" doesn't work once the users is in the guest group. whoever the command "ls" does work.

Any ideas.

thanks
Closed Thread

Bookmarks

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 10:52 AM.


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