Re: transfer links seamlessly



On Saturday 7 June 2008 17:21, Anoop wrote:

Hi,

Need some help here.

I had written an ftp script long back to transfer files from a unix
(solaris) box to windows. This script transfers files fine, except at
the time there was no requirement for soft links. Now there are soft
links and I need to figure out a way to incorporate handling of links.
I think I know how to do it, I can run ls on the file, grep and awk on
the -> characters and that would give me the physical file and I can
pass this file for the ftp instead of the link.

But before I go that route I wanted to check if there is an easier and
more foolproof way of doing this. Is there some command I can give
that gives me the actual file name if it is a link? Or better can I
tell ftp (or sftp rather) to always follow links instead of
transferring only the files?

If you can use something other than ftp/sftp, I suggest you take a look at
rsync. It can handle links in a variety of ways, including preserving or
dereferencing them. Start from man rsync, option -L and subsequent ones.

--
All the commands are tested with bash and GNU tools, so they may use
nonstandard features. I try to mention when something is nonstandard (if
I'm aware of that), but I may miss something. Corrections are welcome.
.



Relevant Pages

  • Re: What does this indicate? (LONG)
    ... FTP File Transfer Protocol A client-server ... protocol which allows a user on one computer to transfer files to and from ... > The firewall has blocked Internet access to your computer (TCP Port ...
    (comp.security.firewalls)
  • Re: A strange win98 networking problem
    ... Sorry I forgot to mention it, but no other TCP/IP applications work - cannot ... > applications that use internet? ... Are you able to download files from FTP ...
    (microsoft.public.win2000.networking)
  • Re: importing problems
    ... I am trying to transfer files one by one via (to a floppy ... time I try to import - it asks for a server and then says ... >need to use a 3rd Party FTP application. ... >FrontPage Resources, WebCircle, MS KB Quick Links, etc. ...
    (microsoft.public.frontpage.client)
  • Re: Ummm... Why cant I find the FreeBSD 6.0 ISO images?
    ... 230-You are user #143 of 1000 simultaneous users allowed. ... Using binary mode to transfer files. ... 227 Entering Passive Mode ... ftp> bye ...
    (freebsd-questions)
  • Re: scheduling ftp
    ... The FTP command is sufficiently flexible to let you set or change just about ... Change the first three "set" commands to reflect your environment. ... I used the knowledge base article to create an ftp script called test.scr ... the variable filename and then call on the ftp script to use the variable ...
    (microsoft.public.windowsxp.general)