LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux command for copying a directory in windows to the Linux partition (https://www.linuxquestions.org/questions/linux-newbie-8/linux-command-for-copying-a-directory-in-windows-to-the-linux-partition-664080/)

thelink123 08-20-2008 10:34 AM

Linux command for copying a directory in windows to the Linux partition
 
Hi,

I want to copy some of the directories in windows partition to my Linux partition. Tell me the command for doing this in Linux.

thanks,
--thelink123

reddazz 08-20-2008 10:39 AM

Hi and welcome to LQ. If you are dual booting, you can do this using a file manager (its either Konqueror if you are using KDE or Nautilus if you are using GOME). An alternative would be to use the command, "cp" (without quotes). You can find out more information about the cp command by entering the command "info cp" or "man cp" in a terminal.

thelink123 08-20-2008 10:56 AM

Thanks for the quick response.I know there is a command like 'mount windows dir linux dir'. The problem is i dont know the exact usage of that. Can u please help me to figure out the exact command for the same.

thanks
--thelink123

David1357 08-20-2008 11:27 AM

Quote:

Originally Posted by thelink123 (Post 3253862)
Thanks for the quick response.I know there is a command like 'mount windows dir linux dir'. The problem is i dont know the exact usage of that. Can u please help me to figure out the exact command for the same.

You can help us by replying with the output of "fdisk -l". Then we can tell you exactly what to type.

In the general case, you need a mount point:
Code:

# mkdir /mnt/windows
Then you need to mount your windows partition:
Code:

# mount -tntfs /dev/sda1 /mnt/windows
These instructions assume your are trying to mount a Windows NTFS partition and that it is the first partition on the first drive, and the first drive is handled as SCSI device by the kernel. If you have an older kernel, or you are using a FAT32 partition, you might need
Code:

# mount -tvfat /dev/hda1 /mnt/windows

thelink123 08-21-2008 01:17 PM

Is this mounting persistent?
 
Thanku so much for the reply. Now i know how to mount a windows folder on to a linux folder.

Now i want to know whether this mounting is persistent. If i restart the syetem will the mounting remain the same. If it does not please tell me how to make the mounting permanent.

thanks
--thelink123

trist007 08-21-2008 03:12 PM

If you want to make it permanent, you have to make an entry in the /etc/fstab file.

Also, on mounting, I usually do

mount -t ntfs /dev/sda1 /mnt/windows

instead of

mount -tnfts /dev/sda1 /mnt/windows

jasohl 08-21-2008 04:27 PM

fstab
 
to mount the windows drive everytime you restart you have to at it to /etc/fstab

Code:

/dev/hda1          /mnt/windows          ntfs          defaults          1 2
basicly all the info and options you use with the mount command

for more info man fstab
info on the options is under man mount


All times are GMT -5. The time now is 11:30 PM.