MEPIS This forum is for the discussion of MEPIS Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-05-2005, 01:50 PM
|
#1
|
LQ Newbie
Registered: Jul 2005
Posts: 2
Rep:
|
referencing a file - newbie question
Hi,
I feel a little stupid to ask this but I am lost (I recently changed from Windows to Mepis).
I run R for statistical analysis and I need to tell the program where the data file is.
In windows that goes like:
c:/documents and settings/Erik/file.txt
In Mepis, the file is on one of the external discs so I expected to use:
file:/mnt/sdb1/Erik/file.txt
but it doesn't work.
Clearly, the file is on a USB disc now carrying the name sdb1.
Can someone please help me on how to reference the file correctly ?
Thanks much in advance,
Greetings,
Erik.
Last edited by FastOwl; 07-05-2005 at 01:52 PM.
|
|
|
07-05-2005, 02:08 PM
|
#2
|
LQ Newbie
Registered: Sep 2003
Distribution: SuSE 9.1, 9.2, 9.3
Posts: 26
Rep:
|
Re: referencing a file - newbie question
Files in any Unix-like (such as Linux) OS are referenced by a path that has the same form, no matter what device on which the file exists. Assuming your USB disk (/dev/sdb1) is mounted on /mnt/sdb1, which seems to be the case, your path to the file will be /mnt/sdb1/Erik/file.txt. The only time to use a "file:" reference will be in a URL. If you wanted your browser to access that file, the URL would be file:///mnt/sdb1/Erik/file.txt.
That drive letter stuff (A:, C:, etc) is restricted to Windowz and Micro$oft.
Larry
Last edited by lwfinger; 07-05-2005 at 02:10 PM.
|
|
|
07-05-2005, 03:50 PM
|
#3
|
LQ Newbie
Registered: Jul 2005
Posts: 2
Original Poster
Rep:
|
Hi,
thanks a lot, that works.
I knew it was simple, but I couldn't figure it out.
One remaining issue though: on windows the same HD always gets the same letter. I have the idea that the assignment on linux changes (e.g. after using a USB stick).
Is there a way to 'fix' the name to the hd ?
again, thanks,
Erik.
|
|
|
07-05-2005, 04:29 PM
|
#4
|
LQ Newbie
Registered: Sep 2003
Distribution: SuSE 9.1, 9.2, 9.3
Posts: 26
Rep:
|
If I am not mistaken, your USB device is being automounted. If so, you essentially have a fixed name for it. It seems that the mount point is /mnt/<last part of device name>. Alternatively, you could change the mounting logic to be anything you want. For example, in my distro, a Windows partition will usually be mounted on /mnt/C, etc. I changed /etc/fstab to mount that partition on /dosc.
I suggest a little reading on devices and file systems under Linux. Fstab is covered in http://learn.clemsonlinux.org/wiki/Fstab. In a quick session at Google, I didn't find a good web site discussion of devices and device names, but I think you would be able to.
Larry
|
|
|
07-05-2005, 04:35 PM
|
#5
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep:
|
Additionally, udev can be used to lock /dev files to specific devices by type, manufacturer, serial number, etc.
|
|
|
All times are GMT -5. The time now is 01:25 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|