mv files from windows share

Asked by Alein

Hi,

I've tried searching the docs and forums, I also posted in the forums but have found no answer for my question which follows:

Hello and thanks for helping;

I have 7.04 desktop running and connecting to a Windows XP share. Everything works fine in the GUI, I can copy, paste etc. What I am having trouble doing is using the CLI to do the same things. I have the share mounted on the desktop and have tried;

Code:
mv //XPBox/ShareName/foo.txt /home/user
mv smb://XPBox/ShareName/foo.txt /home/user

My goal is to move the files/files to Ubuntu, but terminal just returns that it 'cannot stat' the source.

Obviously I must be screwing up something simple in the syntax since the same thing works in the GUI. I know I can just use the GUI but I need this to run automatically on a schedule which is why I want to use the CLI.

All sugestions are appreciated.

Al

gerbman replies:

A couple things. I'm assuming your XP share is an NTFS partition, in which case you'll first need to install NTFS write support if you want to move files from your XP partition to your Ubuntu partition. If you simply need to copy them from NTFS, there's no need for write support. Also, the command to move files should be the following:

Code:
mv /path/to/xp/share/foo.txt /home/user

I repost:

Thanks gerbman,

The share is NTFS but 7.04 appears to have support built-in for it since I have made no effort to add it and I can use the GUI to connect, copy, create and delete files with no difficulty. Unfortunately your suggested syntax does not work as you can see from the attached screenshot.jpg. You will also notice the mounted share and copies of the test files on the desktop. As far as I can tell, mv and cp should work in terminal. Any other suggested syntax would greatly be appreciated.

Obviously I cannot post or attach the screenshot here, you can find it at http://www.thepaddlecompany.com/Screenshot.jpg

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Johnny Chadda
Solved:
Last query:
Last reply:
Revision history for this message
Best Johnny Chadda (joch) said :
#1

The GUI filesystem tools are using the Gnome VFS layer, which is unavailable from the command-line.To mount a remote Windows share from the command-line, install smbfs by running "sudo apt-get install smbfs". Then mount the share in an empty directory:

sudo mount -t smbfs //server/share /mnt

You may specify a username with the "-o username=MyUsername" flag if necessary.

Now you should be able to navigate to the /mnt directory either from the command-line or even the GUI and see the files. To unmount the share when you are done, just run "sudo umount /mnt".

Revision history for this message
Alein (al562ein) said :
#2

I thought in Linux all file devices were always available from the CLI, I see now this may not always be the case.
Thank you for answering my question Johnny.