FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 10-23-2010, 02:58 AM
Humphrey Widjaja
 
Default Windows to Linux File Transfer (Automatically)

Try using WinSCP - http://winscp.net/, eg.:

winscp.exe [mysession] /synchronize [local_directory]
[remote_directory] [/defaults]

Configure the session with your linux server ip, user and password.
You can also configure ASCII/Binary mode setting.

More info, type winscp.exe /help

Best Regards,


Hum / Humphrey K. Widjaja



On Sat, Oct 23, 2010 at 10:39 AM, sunhux G <sunhux@gmail.com> wrote:
> Thanks vm David.
>
>> rsync -e ssh -a somelocalfile someuser@someremotehost:/somepath/somefile
> Does the above command convert from MSDOS text file to Unix text file
> (ie perform 'ASCII") ?
>
>
>> I don't think ascii mode has any important meaning when transferring files
>> from windows to linux when you expect to continue to use the file on
>> windows.
>
> It's important to me because the datafiles transferred will be used on Unix
> subsequently.
>
> Will appreciate if anyone/you tell me where do I insert "dos2unix" &
> "unix2dos" in the above rsync or ssh+cat command (for both ftp
> get & put equivalents).
>
>
> Thanks again
> U
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 10-23-2010, 03:12 AM
sunhux G
 
Default Windows to Linux File Transfer (Automatically)

Thanks Humphrey, I did mention about Winscp earlier in the thread.

What I needed is something that runs in Linux at command line level
(so that I can put in crontab). I do have winscp & I'm aware winscp
can handle 'ascii'. The fact that winscp has 'ascii' built in goes to
show 'ascii' mode is still useful.

Due to network/security design, my Linux box has to be initiating
party (ie the client) to the remote Windows box (ie the server) to
get & put files. So I'll need something on my Linux box that can
do scp/sftp (or rsync via ssh; or ssh+cat+) with 'ascii' mode as
our current ftp method of transferring files has been mandated to
be replaced by scp/sftp/ssh

Tks
U
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 10-23-2010, 03:37 AM
fred smith
 
Default Windows to Linux File Transfer (Automatically)

On Sat, Oct 23, 2010 at 11:12:42AM +0800, sunhux G wrote:
> Thanks Humphrey, I did mention about Winscp earlier in the thread.
>
> What I needed is something that runs in Linux at command line level
> (so that I can put in crontab). I do have winscp & I'm aware winscp
> can handle 'ascii'. The fact that winscp has 'ascii' built in goes to
> show 'ascii' mode is still useful.
>

I haven't seen (unless I've overlooked it) anyone suggesting that
you could use smbclient on linux to script file transfers to or from
windows. assuming it has a way to find out which files you need to
pull over from windows to linux, it wouldn't be very hard to do, either.

along with a little bash scripting you could make a fairly powerful
file transfer tool out of it.

'man smbclient' gives a moderately helpful man page, including a
bunch of examples of how to use it.

I've used it in cron jobs, at work, to push files from linux over
to windows, and it works well for that.


--
---- Fred Smith -- fredex@fcshome.stoneham.ma.us -----------------------------
"Not everyone who says to me, 'Lord, Lord,' will enter the kingdom of
heaven, but only he who does the will of my Father who is in heaven."
------------------------------ Matthew 7:21 (niv) -----------------------------

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 10-23-2010, 04:45 AM
Humphrey Widjaja
 
Default Windows to Linux File Transfer (Automatically)

You can also lftp. For more info: http://lftp.yar.ru/

lftp -c 'open -e "mirror <remote_dir> <local_dir>/" <bookmark>'

Your linux should have lftp installed

Best Regards,


Hum / Humphrey K. Widjaja

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 10-23-2010, 03:06 PM
sunhux G
 
Default Windows to Linux File Transfer (Automatically)

> lftp -c 'open -e "mirror <remote_dir> <local_dir>/" <bookmark>'
Glad that lftp can be scripted

> You can also lftp. For more info: http://lftp.yar.ru/
I've browsed above link & it says nothing about ASCII nor Append
modes equivalent of ftp. In fact I'm highly doubtful that with sftp
protocol, lftp would support ASCII & APPEND modes


>'man smbclient'
I think samba client helps with files transfer between Unix & Windows
but in my case, my customer only permits tcp22 (ie ssh & sftp)
traffic (currently it's ftp but this is going to be replaced) between
my Linux box & their Windows box; no Netbios nor any other ports.

http://lists.samba.org/archive/samba/2004-July/089454.html
The above link indicates that ASCII mode is not supported
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 10-24-2010, 10:51 AM
sunhux G
 
Default Windows to Linux File Transfer (Automatically)

Hi Humphrey,

The link below did mention about ASCII support by lftp but do
you know if this still stands if we're using sftp or scp protocol?


http://lftp.yar.ru/lftp-man.html
*
*
*mget* [*-c*] [*-d*] [*-a*] [*-E*] [*-O* *base*] *files*

*mput* [*-c*] [*-d*] [*-a*] [*-E*] [*-O* *base*] *files*

-a use ascii mode (binary is the default)
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 10-25-2010, 08:55 AM
"Mertens, Bram"
 
Default Windows to Linux File Transfer (Automatically)

I would recommend against FTP as it (at least with all ftp clients I've seen and used) doesn't provide clear feedback in case of problems. At least not by means of return codes etc. you can check on.

I've seen several implementations where the output is parsed to implement some form of checking.

Using rsync would also be recommendation. As stated it allows to use a secure connection, is robust and if conversion from dos2unix is needed simply add it as a step in the cron job.
I haven't tested this but if I remember correctly dos2unix doesn't touch binary files or files which are already in unix format. So it's safe to run on a bunch of files after every run.

Regards

Bram

>


Mazda Motor Logistics Europe NV, Blaasveldstraat 162, B-2830 Willebroek
VAT BE 0406.024.281, RPR Mechelen, ING 310-0092504-52, IBAN : BE64 3100 0925 0452, SWIFT : BBRUBEBB

-----Original Message-----
> From: redhat-list-bounces@redhat.com [mailto:redhat-list-
> bounces@redhat.com] On Behalf Of sunhux G
> Sent: zondag 24 oktober 2010 12:51
> To: General Red Hat Linux discussion list
> Subject: Re: Windows to Linux File Transfer (Automatically)
>
> Hi Humphrey,
>
> The link below did mention about ASCII support by lftp but do
> you know if this still stands if we're using sftp or scp protocol?
>
>
> http://lftp.yar.ru/lftp-man.html
> *
> *
> *mget* [*-c*] [*-d*] [*-a*] [*-E*] [*-O* *base*] *files*
>
> *mput* [*-c*] [*-d*] [*-a*] [*-E*] [*-O* *base*] *files*
>
> -a use ascii mode (binary is the default)
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 10-25-2010, 05:05 PM
 
Default Windows to Linux File Transfer (Automatically)

Mertens, Bram wrote:
> I would recommend against FTP as it (at least with all ftp clients I've
> seen and used) doesn't provide clear feedback in case of problems. At
> least not by means of return codes etc. you can check on.
>
> I've seen several implementations where the output is parsed to implement
> some form of checking.
>
> Using rsync would also be recommendation. As stated it allows to use a
> secure connection, is robust and if conversion from dos2unix is needed
> simply add it as a step in the cron job.
> I haven't tested this but if I remember correctly dos2unix doesn't touch
> binary files or files which are already in unix format. So it's safe to
> run on a bunch of files after every run.

I agree - in fact, I said rsync in about the fourth response. ftp, if not,
say, sftp, is *completely* insecure. rsync runs on both windows and Linux
(and everything else), works *very* nicely, gives you warm fuzzy feedback
if you like, and can easily be set to copy only changed files... which is
how we do our online and offline backups.

mark

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 10-28-2010, 01:59 PM
sunhux G
 
Default Windows to Linux File Transfer (Automatically)

Thanks.

Appreciate if anyone can help amend the command below to
insert dos2unix(win to Linux transfer) & unix2dos (Linux to Windows
transfer)

> rsync -e ssh -a somelocalfile someuser@someremotehost:/somepath/somefile
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 10-28-2010, 03:45 PM
David Bear
 
Default Windows to Linux File Transfer (Automatically)

you will want to change the way it works. You will still need to tunnel thru
ssh, but you will want to start rsync in daemon mode on the unix host. Take
a look at postexec options on the rsync.conf file. postexec is a way to fire
off some other command after the transfer is complete. google is your
friend.

On Thu, Oct 28, 2010 at 6:59 AM, sunhux G <sunhux@gmail.com> wrote:

> Thanks.
>
> Appreciate if anyone can help amend the command below to
> insert dos2unix(win to Linux transfer) & unix2dos (Linux to Windows
> transfer)
>
> > rsync -e ssh -a somelocalfile someuser@someremotehost:/somepath/somefile
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



--
David Bear
College of Public Programs at ASU
602-494-0424
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 05:25 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org