LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Write to a file in Linux with an absolute network path (https://www.linuxquestions.org/questions/linux-newbie-8/write-to-a-file-in-linux-with-an-absolute-network-path-753308/)

jsenar 09-07-2009 08:49 AM

Write to a file in Linux with an absolute network path
 
Hi everybody.

I'm new to this forum, so I say hello to everyone first.

Secondly I would like to launch the following thread, concerning a problem I am unable to solve for the moment. I am writing in a QSA script a small program inside a server application, that has to write to a file in an absolute network path like: "//server-ip/folder/file.txt". I am writing it in any possible way but it doesn't write unless I use a relative path. The problem is that if I do it so, as the program is used in several different workstations, the place of the file changes depending on the workstation. The aim is to get the file on a network shared folder, no matter the workstation which executes the script.

Has somebody a solutin for this?

Many thanks in advance.

bartonski 09-07-2009 12:50 PM

use smbclient
 
If you rely on the linux file system to access windows shares, you will always have this problem. The answer is to use the smb protocol directly via samba. There is a program in the samba suite called "smbclient" which allows you to access files somewhat like ftp.

I would suggest reading through the man pages and trying write to the file in question. If you run into specific problems, post back to the forum.


All times are GMT -5. The time now is 08:09 AM.