Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a shared filesystem (E: in my installation of Windows 7) in which I keep my programming codes. I want to shift from Windows to Ubuntu for programming mainly because I like the linux terminal compared to alternative in Windows.

I asked this question after which I came to know that my shared filesystem is /dev/sda5. I tried to use terminal to cd to this directory but I wasn't able to do so.

I have the shared filesystem loaded and I was in /dev when I tried to change to sda5. The error was

bash: cd: sda5: Not a directory

How can I do that?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You need to make it mounted in somewhere. The device is there but you have no access to it to achieve this you must use the mount command. First create a mounting point as:

sudo mkdir /mnt/shared

Then you can mount the sda5 to it:

sudo mount -t ntfs /dev/sda5 /mnt/shared

Now, your files should be in /mnt/shared:

cd /mnt/shared

I don't encourage you to do so cause it can harm files having different end line encodings in windows / linux. What I suggest you is to create another partition and move the files you want to use on both systems there. Then stick with a multi OS IDE.

share|improve this answer
    
Can I mount only a particular folder from the drive there? The reason I cannot keep it in Ubuntu is because it is installed inside Windows and my computer doesn't have good enough configuration to have 2 separate OS. –  Aseem Bansal Aug 7 '13 at 17:06
    
@AseemBansal Sure you can all you have to do is specify the whole path of the directory i.e: sudo mount -t ntfs /dev/sda5/blah /mnt/shared Where blah is the specific folder you want to mount. . Notice that mount does not use twice as much space in the disk as you mentioned cause all the command do it to enable the files in disk to access from the OS. –  vfbsilva Aug 7 '13 at 17:08
    
So the only things I have in the directory are simple .C files, git files and simple windows folders then that wouldn't mess up line encodings. Correct or that can mess up things even in this case like you said? –  Aseem Bansal Aug 7 '13 at 17:12
    
@AseemBansal line ends can be messed up in text files. As I've mentioned if you are consistent with the IDE you are using in both systems it will not be a problem. –  vfbsilva Aug 7 '13 at 17:19
add comment

You need to mount the partition.

Create a directory where you want to mount it. mkdir ~/programCode

Then mount the partition there sudo mount -t ntfs /dev/sda5 ~/programCode

cd ~/programCode and you files should be there

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.