Visit Our UNIX and Linux User Community

Full Discussion: Is this possible?
Top Forums UNIX for Advanced & Expert Users Is this possible? Post 26087 by norsk hedensk on Monday 12th of August 2002 12:31:34 AM
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 www.yoursite.com the page they will see is index.html and will look to them www.yoursite.com/index.html 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.
 
Test Your Knowledge in Computers #514
Difficulty: Easy
As a general rule, the more a variable is used, the longer the variable name should be.
True or False?
MV(1)							      General Commands Manual							     MV(1)

NAME
mv - move or rename files SYNOPSIS
mv [ -i ] [ -f ] [ - ] file1 file2 mv [ -i ] [ -f ] [ - ] file ... directory DESCRIPTION
Mv moves (changes the name of) file1 to file2. If file2 already exists, it is removed before file1 is moved. If file2 has a mode which forbids writing, mv prints the mode (see chmod(2)) and reads the standard input to obtain a line; if the line begins with y, the move takes place; if not, mv exits. In the second form, one or more files (plain files or directories) are moved to the directory with their original file-names. Mv refuses to move a file onto itself. Options: -i stands for interactive mode. Whenever a move is to supercede an existing file, the user is prompted by the name of the file followed by a question mark. If he answers with a line starting with 'y', the move continues. Any other reply prevents the move from occur- ring. -f stands for force. This option overrides any mode restrictions or the -i switch. - means interpret all the following arguments to mv as file names. This allows file names starting with minus. SEE ALSO
cp(1), ln(1) BUGS
If file1 and file2 lie on different file systems, mv must copy the file and delete the original. In this case the owner name becomes that of the copying process and any linking relationship with other files is lost. 4th Berkeley Distribution April 29, 1985 MV(1)

Featured Tech Videos

All times are GMT -4. The time now is 07:41 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy