I'm using Ubuntu on my computer. On my desktop, I see a folder that says 'web on 10.100.10.28'. When I try to overwrite a file, I get a good warning 'The file already exists in smb://john@10.100.10.28/web/sites/mysite.com/wp-content/themes/Simplism. Replacing it will overwrite its content.'

I want to use the vi editor via terminal to edit the file smb://john@10.100.10.28/web/sites/mysite.com/wp-content/themes/Simplism/index.html. But when I type

vi smb://john@10.100.10.28/web/sites/mysite.com/wp-content/themes/Simplism/index.html

then add some content and try to save, the terminal tells me I am unable to save. What's wrong with what I'm doing? And how come I can't do this?

cd smb://john@10.100.10.28/web/sites/mysite.com/wp-content/themes/Simplism

I looked in /dev, /media and /mount, but don't see how to go to that directory

link|improve this question

feedback

2 Answers

You can try to mount the smb location using the mount command. Using:

mount -t smbfs -o username=username,password=pwd //shared/ destination

or

mount -t cifs -o username=username,password=pwd //shared/ destination

(the command depends on your os version)

and then try to edit a file with vi.

And: are you sure you have write access to that folder?

link|improve this answer
feedback

If you've contacted the server with gnome, it's already mounted in your home directory.

# vi ~/.gvfs/web\ on\ 10.100.10.28/sites/mysite.com/wp-content/themes/Simplism/index.html

will probably work.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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