Ubuntu Forums Archive Viewer

Cant rename directory in localhost.

Archived thread 1045969 from Ubuntu Dev Link Forum. Markdown source: Ubuntu_Dev_Link_Forum/thread_1045969_Cant_rename_directory_in_localhost..md

Original URL About this archive
#1

I installed LAMP a few weeks ago, and moved a folder to the /var/www/ folder. Only realizing I didn't rename it, and I tried to fix things using the terminal.

Is there some way I can rename it?

#2

mv /path/to/old_name /path/to/new_name

#3

amauk said: mv /path/to/old_name /path/to/new_name

Already tried that, I get a permission denied.

#4

use sudo (gives you root privileges)

sudo mv /path/to/old_name /path/to/new_name

#5

amauk said: use sudo

(gives you root privileges)

sudo mv /path/to/old_name /path/to/new_name

Hey! :D It worked! Thanks! Damn confusing terminal! But, its what I like about linux.

#6

Question... Why is it you get the same results using the su command? Is su just a shorter version for sudo?

#7

Eeek nevermind. I just looked up the answer. And they arent necessarily the same command. :/ Embarresment!