LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS
User Name
Password
MEPIS This forum is for the discussion of MEPIS Linux.

Notices


Reply
  Search this Thread
Old 07-05-2005, 01:50 PM   #1
FastOwl
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Rep: Reputation: 0
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.
 
Old 07-05-2005, 02:08 PM   #2
lwfinger
LQ Newbie
 
Registered: Sep 2003
Distribution: SuSE 9.1, 9.2, 9.3
Posts: 26

Rep: Reputation: 15
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.
 
Old 07-05-2005, 03:50 PM   #3
FastOwl
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Original Poster
Rep: Reputation: 0
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.
 
Old 07-05-2005, 04:29 PM   #4
lwfinger
LQ Newbie
 
Registered: Sep 2003
Distribution: SuSE 9.1, 9.2, 9.3
Posts: 26

Rep: Reputation: 15
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
 
Old 07-05-2005, 04:35 PM   #5
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Additionally, udev can be used to lock /dev files to specific devices by type, manufacturer, serial number, etc.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie question re: file locations cartwright Mandriva 3 11-20-2005 07:00 PM
writing to file newbie question misterjingo Linux - Newbie 3 09-26-2005 03:59 PM
Very newbie question - How to use a .bin file durrantj Ubuntu 6 08-15-2005 07:45 PM
Newbie question! How to run a file ?? honet Linux - Newbie 3 11-18-2003 05:05 AM
newbie file backup question samiam Linux - General 2 11-14-2001 03:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > MEPIS

All times are GMT -5. The time now is 01:25 AM.

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