Is this possible?

Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Is this possible?
# 1  
Old 08-12-2002
Question Is this possible?

Is it possible via telnet on a shared server to move directories and files from a sub-directory to the root (public_html)?

I have a sub-directory in the public_html directory and I want to move all files and sub-directories into the root.

hope that makes sense. Smilie
# 2  
Old 08-12-2002
yes it is, i think understand what you are trying to say. we can say that your http server root is /usr/local/httpd/htdocs/ this is the directory where your index.html and the rest of your website is stored, when someone goes to the page they will see is index.html and will look to them in actuality this is located on the server in the directory /usr/local/httpd/htdocs -- that make sense? just trying to laydown the basics. ok so you want to move the contents of /usr/local/httpd/htdocs/ into the root directory of your server, / (i have to ask though why you would want to do that it will just clutter up a nice neat filesystem.) so to do this via telnet, (one more thing id recomend that you ditch telnet and use ssh for your remote shell access) so you login to your server from telnet, you cant login as root, you can enable root logins but this is a BADDDDD idea, root logins are disabled by default by most systems i believe. so you login to telnet with your user name, _yourname_ put in your password and now you are at your prompt. if you have your permissions set for the /usr/local/httpd/htdocs/ that makes you the owner, actually wait, you want to move it to / ok so first thing to do is enter this command:
su -
you will be prompted for a password, enter your root password, the su with the - makes su Switch User to root, (if no name is specified) the "-" makes su act as a login shell, (is convienient when you want to check root's mail when logged in like this) then cd to /usr/local/httpd/htdocs/
then enter the command:
cp *.* /
MAKE sure that you are in the directory of the files that you want to move, /usr/local/httpd/htdocs/ is just an example, your htdocs forlder may be somwhere else or you may be using a different name and place altogether for the server root directory. then you are done.
this is a very simple proccess but i tried to be as descriptive as possible, well, have fun.
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question