Ubuntu 13.04 Unable creating a file in /var/www

Asked by budi machribie

Hi,

I've installed LAMP in Ubuntu 13.04 and tried to create a file in /var/www by typing "edit <filename.html)" but cannot type anything in the form >>the cursor just keep blinking

Any suggestions

Regards

Budi M

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
budi machribie
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

The folder is root owned. You will need to use sudo (for CLI editors) and gksudo (for graphical editting)

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

On Ubuntu the command "edit" does not open an editor, you have to use gedit instead.

You might try using the command:
gksudo gksudo gedit /var/www/filename.html

If there is no graphical environment available, you could use the nano editor:
sudo nano /var/www/filename.html

Revision history for this message
budi machribie (budimr-yahoo) said :
#3

Dear Manfred & Actionparsnip

It Works

Thanks for your info

One question how do I delete an existing file ...delete won't work :(

Regards

Budi M

Revision history for this message
budi machribie (budimr-yahoo) said :
#4

Manfred & Actionparsnip

I've find the answer

find /var/www/test2.html -delete

Regards

Budi M

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

The commands that you have to use at the command prompt in Ubuntu are a bit different from those that you would use on a Windows computer's command line.

Windows copy -> Ubuntu cp
Windows dir -> Ubuntu ls
Windows type -> Ubuntu cat
Windows del -> Ubuntu rm
Windows runas /user=Adminstrator -> Ubuntu sudo
etc. etc. etc.

see https://help.ubuntu.com/community/UsingTheTerminal#File_.26_Directory_Commands for the most important ones