LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-07-2009, 08:49 AM   #1
jsenar
LQ Newbie
 
Registered: Sep 2009
Posts: 3

Rep: Reputation: 0
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.
 
Old 09-07-2009, 12:50 PM   #2
bartonski
Member
 
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Blog Entries: 1

Rep: Reputation: 48
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.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get the absolute path of file using file descriptor. appas Programming 7 01-19-2012 11:47 AM
java applet not loading image with relative path but loads image with absolute path amolgupta Programming 2 07-20-2009 01:58 PM
Absolute path qspares Linux - Software 6 10-02-2007 03:11 AM
Image Path reference in Linux (Absolute path) javabuddy Linux - General 7 06-05-2006 07:45 AM
relative to absolute path vishalbutte Programming 4 01-14-2006 03:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration