Results 1 to 6 of 6
I have 2 questions found at the end of this post.
I am quickly approaching the place where my openSUSE system gives me all the functionality of XP and all ...
- 04-18-2008 #1
Network Full Path Filespec
I have 2 questions found at the end of this post.
I am quickly approaching the place where my openSUSE system gives me all the functionality of XP and all the compatibility of using the same file formats. Those were my success requirements.
Beyond that, Linux has it's own merits which I have just begun to appreciate.
I'm having one problem, however, for which I can find no solution. Usually my rule of thumb is that if I can distill the problem to the 5 most significant words I can find the answer or direction to the answer on my first search with Google or AltaVista. With this problem I'm stumped. And I've been searching off and on for a couple of weeks now.
So far:
It appears that I can refer directly to any files on any block devices I can mount. ie. /media/drives/dosC/Windows/FooBar.txt So far I can use this Filespec on terminal command lines and in setup, installation or profile files.
It also appears that I can access network files through a file browser if they have been setup as Samba Shares. I can open, run, copy, or delete.
However it appears that unless I find a way to mount samba network shares, I cannot access the network files via a filespec on command lines or from within .ini type files.
I don't seem to be able to access network files via a filespec such as //ServerBig/dosC/Windows/FooBar.txt
Is there a way to reference network files directly via a full path filespec?
If not, can I mount samba shares so I can refer to them in this manner? I don't need specific code. I just need a point in the right direction.
I hope I've been clear in what I'm looking for here.
Thanks.
- 04-18-2008 #2Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
I foresee that you enjoy investigating yourself, so I won't spoil that. Just a hint: smbmount.
Not that there's much to investigate anyway :P
If you need more help, just ask
- 04-18-2008 #3
Thanks. That appears to be all I need. At least for now. However, I'm also the kind of guy who likes to be absolutely sure I've got it, so one more question:
I'm correct then in my observation that there is no way to directly reference a filespec in a command line other than for files which have been mounted into the file system somewhere under / ? In Linux there is no higher level than /foobar.txt as there is //ServerBig/foobar.txt in DOS?
Well, I guess that's two questions.
- 04-18-2008 #4Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
This is true not only in linux, but under any OS. There's no way to reference a file until the filesystem that that block device contains has been mounted adequately (in one way or another, depending on the OS). Until then, the device is just a raw black cube, which has lots of meaningless sequences of bytes inside.
Windows also mount shares on a similar fashion. In fact, samba is just an alternative implementation of the smb/cifs stuff that windows uses to mount network filesystems, so, besides OS related aspects, there's little difference in how they do it. The difference for the final user is that in windows these details remain hidden. And that's why you think that windows has some kind of different level or something to refference network files.
But it's really the same. Windows just automounts everything.
You can read more about this smb stuff here if you want:
Samba (software - Wikipedia, the free encyclopedia)
- 04-18-2008 #5
After thinking about this for a bit, I have to admit that I'm not really qualified to dispute the statement above, though I find it very hard to believe. Are you saying that every time I enter a URL into my browser, before my browser can display the contents of that file, my OS must somehow mount that filesystem, or at least the file, somewhere within my local file system?
With the greatest of respect, I'd suggest that there is a very big difference. My question was not regarding TCP/IP theory, but my question was, in fact regarding implementation. And I'm not trying to make any point as to one way being better/worse than another.(Snip)
In fact, samba is just an alternative implementation of
(Big Snip)
But it's really the same. Windows just automounts everything.
(Snip)
DOS, however it implements network sharing, REFERENCES network files on the command line using a superposed continuation of the local file system tree hierarchy. Network files are above and exterior to the local file system.
Linux on the other hand, appears to internalize network files for purposes of the command line. When network files are mounted within the local file system tree, the network files become internal to that file system, at least for the purposes of the tree metaphor. I'm not yet sure why, but I have the feeling that this requires some mental caution lest one set up a file system containing loops around the internet or some such thing. You can cause havoc within a physical ethernet network by doing that and I want to make sure I don't do something similar to my local file system.
Perhaps this is where I didn't make myself clear enough in my initial posts. Which leaves me with restatements of my last two questions:
Is there any way in Linux to reference a full network path filespec on a command line other than as files already mounted internally to the local file system?
Thanks again.
By the way, this link goes nowhere but thanks for the suggestion. There are plenty of Samba articles and manuals out there. I'm here because I couldn't find it there.
You can read more about this smb stuff here if you want:
Samba (software - Wikipedia, the free encyclopedia)
- 04-18-2008 #6Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
No. That's entirely unrelated.
I only said that, if you intend to use the regular command line tools, you need to have a filesystem to interact with. An url is loaded via a very specialized program. You can't mv, cp or ls urls.
All that I said above was in respect to that: if you want to interact with general filesystem tools, you need to put the relevant elements into a filesystem of any kind, and linux is particularly good at that. You could still read raw data from your network interface, if that's what you mean. But even then, you would be reading from a file in the /dev filesystem. In linux, even if you don't believe it, everything is (or come from) a file of any kind.
This way, you can use and reuse system tools, without needing to write a specialized program just to transfer files. It's easier this way. You mount the filesystem and you can reuse all the tools without needing to add net capabilities into them.Linux on the other hand, appears to internalize network files for purposes of the command line. When network files are mounted within the local file system tree, the network files become internal to that file system, at least for the purposes of the tree metaphor. I'm not yet sure why, but I have the feeling that this requires some mental caution lest one set up a file system containing loops around the internet or some such thing. You can cause havoc within a physical ethernet network by doing that and I want to make sure I don't do something similar to my local file system.
The caution required is the same you need in any other model: set the permissions on the server side as strict as you can.
System wide: no. Specific tools can do things like when you do "scp root@server:/root/myfile.txt .". But that's specific to each tool. If you want to interact with the regular system tools, you still need to mount the system. And again: windows is not different in that regard.Is there any way in Linux to reference a full network path filespec on a command line other than as files already mounted internally to the local file system?
Let me explain in other way: specific tools can open connections and do specialized stuff on their own by reading directly from the network device. But if you want to use a remote file like if it was a local file with a program that is not network-aware, then you need to mount the volume, in one or another way.
Let's call it shared folders or whatever: they are mounted locally so you can open files as if they were local on a notepad or via command line. And if they are not, windows mounts the local share instantly.
That's at least my understanding, there's no way anyone can give a definitive answer, since no one has taken a look into the windows sources.
I am by no means an OS guru, so, some of the things I said might not be completely accurate, overall in which regards windows. In the university we study only serious OSes and anyway there's no way to study something that's closed and, therefore, complely unknown :P
EDIT: The link in the post above is now fixed. Sorry


Reply With Quote
