next up previous contents index
Next: Deleting Files Up: Managing Files and Directories Previous: Creating Files and Directories   Contents   Index

Moving Files

Moving files is easier then it might sound. In order to move a file called newfile.txt into a directory called temp/ you could type:

bash$ mv newfile.txt temp/

If the directory did not exist then this would change the name of the file from newfile.txt to temp/ instead. If you are logged in as root or have superuser privileges you can copy the file to a directory that the user might not have rights to copy files to:

bash# mv newfile2.txt /var/www/html/

Joseph Colton 2002-09-24