LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 05-03-2004, 02:02 PM   #1
nyxriver
LQ Newbie
 
Registered: May 2004
Posts: 9

Rep: Reputation: 0
file managment / finding files


Ok this is really confusing me more than anything else.
I'm really the kind of user that does tons of stuff through windows explorer. I really cant live without it. Transfering files from folder to folder, finding files deep within subdirectories, etc.
I installed Mandrake on my C drive
but I have music files on my D drive that I would like to open
my files are located at
D:\Nikki's Songs\MP3s
now if mandrake or any other distro is located on the C drive
can someone PLEASE explain to me how I'd get it to go to D:\nikki's songs\mp3?
Ive been reading about how you get from directory to subdirectory and back up to "Root"
but what exactly does Root specify compared to windows? is root C?
and how do you switch root to "My Computer" so I can access both C and D drives?
Thanks for your help.
Feel free to link to tutorials too if thats easier, I'm not afraid to read, just cant find the right one to read with the info I need!
 
Old 05-03-2004, 02:10 PM   #2
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
What you need is MOUNT. The mount command attaches a particular storage volume in a certain folder.
Mandrake should have probably built for you the dir /mnt, right? If you installed Mdk after having win in the same machine, it's very likely that Mdk is mounting your win partitions under /mnt, already.
If not, post again and we'll solve it.

Last edited by bruno buys; 05-03-2004 at 02:11 PM.
 
Old 05-03-2004, 05:05 PM   #3
nyxriver
LQ Newbie
 
Registered: May 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Ok I'm really sorry for my ignorance, I am new to linux, using commands
Here's what I've tried so far

root@localhost root]# mount -t auto /dev/hd /mnt/hd2
mount: permission denied
[root@localhost root]# dir
drakx tmp
[root@localhost root]# /rnnt
bash: /rnnt: No such file or directory
[root@localhost root]#

I think that I was able ot name my 2nd HD hd if I was lucky enough to know what I was doing. lol
sorry I am reallly confused. I sound like such an idiot.
 
Old 05-03-2004, 05:20 PM   #4
gregaryh
Member
 
Registered: Jan 2004
Location: Utah USA
Distribution: SuSE Pro 9.0
Posts: 43

Rep: Reputation: 15
The Linux Filesystem Hierarchy is a bit confusing when you are used to the concept of drives. A lenghty explanation will not fit here. Basicly though you can think of the file system as a tree with / (called the root directory) at the top and everything attaches to the tree below that. It does this by mounting devices. In windows terms the first partition on your primary hardisk is usually called C: In linux it is /dev/hda1
If your D: drive is the second partition of your main hard disk then in linux it would be /dev/hda2
If the D: drive was a separate hard disk then it will likely be /dev/hdb1

To mount it you also need to know what files system it is. If it is a Windows NT/2000/XP then it is likely to be NTFS which linux can mount as Read Only. If it was Win 95/98/ME then it is likely FAT.
The mount -t auto should be able to determine the filesystem.
 
Old 05-03-2004, 05:23 PM   #5
urka58
Member
 
Registered: Nov 2003
Distribution: slackware 14
Posts: 540

Rep: Reputation: 32
try posting your /etc/fstab.
It could be explanatory about your filesystem to anybody want help you.
Mandrake is usually very user friendly and it possible you already have your system well configured.
Ciao
 
Old 05-03-2004, 05:25 PM   #6
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 83
The first thing to do is describe your computer in more detail. If you have a C: drive and a D: drive in Windows, that could mean that you have 2 hard disks, or that you have a single hard disk that you have split into 2 partitions - which is it? In either case, if you are unable to access the data in the "D:" drive, it may simply be that you have not mounted that partition, as bruno has described. In order to correct that condition, you simply need to manually mount it. As root, you would just need to:
mount /dev/hd<x><y> /<mountpoint>

where <x> is the device letter and <y> is the partition number and <mountpoint> is the mount point you want to mount the drive to. Note that the device letter depends on whether the drive is a primary/secondary and wehter it is master/slave. For reference:
Primary Master = /dev/hda
Primary Slave = /dev/hdb
Secondary Master = /dev/hdc
Secondary Slave = /dev/hdd

Then, depending on how many partitions you may have created on each drive, each one will have its own number (eg, if you have created 3 partitions on your Primary master, they will be /dev/hda1, /dev/hda2, and /dev/hda3)

To illustrate, using your situation as an example, suppose that you had a single hard drive with 2 partitions, and you wanted to mount your "D:" drive to the /mnt/extra. I'll assume that the "C:" drive is /dev/hda1, and so the command to mount the "D;" drive (which I'm assuming would be /dev/hda2) would be something along the lines of:
mount /dev/hda2 /mnt/extra

Naturally you would want to adjust the above to fit you exact drive particulars. Once the drive is mounted, you should be able to access it in exactly the same way that you do for the "C:" drive, whether that's through the GUI or the command line.

Two last comments: in order to view which partitions are currently mounted, just run the "display file" command: df
In order to cause the "D:" drive to automatically be mounted when you boot up, you will need to add an entry to the /etc/fstab file. There are numerous posts here at LQ on how to do that. Good luck with it. -- J.W.
 
Old 05-03-2004, 07:19 PM   #7
nyxriver
LQ Newbie
 
Registered: May 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Ok, here's what I have
I have windows XP Home Edition along with Mandrake 10
I have two hard drives, that are seperate hard drives. C and D
According to Mandrake my C drive is
/mnt/windows
and my D drive is
/mnt/hd2

I do apologize for not being familiar at all with these commands, I'm trying to learn all of this from complete scratch.
This is what my etc/fstab says
/dev/hda5 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda7 /home ext3 defaults 1 2
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
/dev/hdd /mnt/cdrom2 auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,sync,codepage=850 0 0
none /mnt/hd2 supermount dev=/dev/hdb1,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,kudzu,codepage=850 0 0
/dev/hda1 /mnt/windows ntfs umask=0,nls=iso8859-1,ro 0 0
none /proc proc defaults 0 0
/dev/hda6 swap swap defaults 0 0
none /mnt/hd supermount dev=/dev/ide/host0/bus0/target1/lun0/part1,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,kudzu,codepage=850 0 0

NOTE: Somehow, after I restarted my computer, I have a link to my D drive on my desktop, how did I do this? and how can I do it for my C drive also?
 
Old 05-04-2004, 02:01 AM   #8
nyxriver
LQ Newbie
 
Registered: May 2004
Posts: 9

Original Poster
Rep: Reputation: 0
how do I access these dev/hd files so I can get the files off of them?
btw, as I updated some stuff and switched distros here's my etc/fstab info again
/dev/hda7 / ext3 defaults,noatime 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0622 0 0
# Dynamic entries
/dev/hda1 /mnt/hda1 ntfs noauto,users,exec,ro,umask=0222 0 0
/dev/hda5 /mnt/hda5 ext3 noauto,users,exec 0 0
/dev/hda6 swap swap sw,pri=1 0 0
/dev/hdb1 /mnt/hdb1 auto noauto,users,exec 0 0

I'm afraid I erased all of my D drive with my songs and everything when in installed mepis
 
Old 05-04-2004, 03:48 PM   #9
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
Type
Code:
fdisk -l /dev/hdb
It will show how your hard drives are partition. Assuming your D: is /dev/hdb and you have only one partition, the D: should be /dev/hdb1. See if your D: mounts correctly with
Code:
mount /dev/hdb1 /mnt/hd2
If it fails, check to make sure you have created the /mnt/hd2 directory.
If it still fails, post the output of
Code:
fdisk -l /dev/hda
fdisk -l /dev/hdb
 
  


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
Command to Finding Source files for a library file jonty_11 Programming 1 03-23-2005 06:17 PM
Finding files with terminal joeman3429 Fedora 10 07-22-2004 10:13 PM
finding files in C++ poeta_boy Programming 2 07-11-2004 02:25 AM
Finding files brentos Linux - General 3 03-22-2004 09:24 PM
Finding files Nicksan Linux - Software 3 06-30-2003 08:16 PM


All times are GMT -5. The time now is 11:59 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration