Reputation: 2275
I need to Read files form Linux , copy them into the another computer(Windows operation) and even delete file in Linux. but I want do this with .net program.!!!
these file have a specific location. I need code sample or article for doing that.
Upvotes: 1
Views: 2962
Reputation: 9250
As stated before, there are several ways to do this:
Set up a samba share on the linux box, that lets you access the files from your windows box with your .NET programm. Beware of not to expose private files to the net (like /etc or /var). Additionaly do not expose actively used files since it will cause unexpected behaviour if your deamon tries to access a file, that your programm works on. Just access exported, passive data files over the net.
Use libraries for SSH with your programm to access the files on the linux box programmatically.
Set up a cron job on the linux box, that copies the files regularly to a share on your windows box to be processed over there.
Set up a deamon in mono/.NET that runs on the linux box and passes the files over an API to your windows client .NET app.
Write the whole programm in mono/.NET and let it compute on the linux box.
Just some approaches to a solution, just pick one that suits you.
Upvotes: 1
Reputation: 799490
Use something that speaks a useful file transfer protocol.
Upvotes: 0
Reputation: 186108
There are plenty of ways to do this, most of which have nothing to do with writing code. The most obvious is to share the Linux files with the Windows machine using Samba.
Upvotes: 0