LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 02-09-2012, 06:12 AM   #1
svar
Member
 
Registered: Jul 2003
Posts: 352

Rep: Reputation: 30
accessing network storage from a script


I have some files in a network storage. In Ubuntu the
storage is seen as myuser on ba-23542e.local
The question is, how do I refer to files and directories there from a script, e.g.

$dir=(this is what I do not know how to refer to)
foreach $file(readdir DIR ){....
}
 
Old 02-09-2012, 03:27 PM   #2
theNbomr
Senior Member
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 4,504

Rep: Reputation: 602Reputation: 602Reputation: 602Reputation: 602Reputation: 602Reputation: 602
Normally, files are accessed as part of a mounted filesystem. It isn't clear what you mean exactly by 'a network storage', as there are numerous network filesytems; NFS, SMB/CIFS being the most common.

You can see what filesystems are mounted on the local host, along with their respective mountpoints, by running mount with no arguments. If the network storage is not mounted, you will have to find out what network shares it exports, and then use mount, as root, with the appropriate arguments to mount the network share.

For more details:

man mount

--- rod.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is this a secure way to set up a home network (with network storage) ? phildacey Linux - Security 2 08-24-2006 04:25 AM
LXer: Accessing Network attached storage from Linux system for file sharing and backup purpose LXer Syndicated Linux News 0 05-20-2006 02:03 AM
issues with mirc script accessing our php script dtra Linux - Software 2 07-02-2005 04:30 PM
Accessing USB Storage Device in RedHat 9 kvsmani Linux - Hardware 0 02-14-2004 12:41 AM
Accessing USB Mass storage device in Linux..?? kvsmani Linux - Hardware 0 02-11-2004 12:03 PM


All times are GMT -5. The time now is 09:40 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration