LNEXT
ONELCLEAN
UTERMINAL
TERMINAL
NEXT
$V1$
HILINE
PAUSE
MVSYNTAX
COMMAND SYNTAX: mvdir old-dir new-dir
SYSTREE
/
|
--------------------------------------
| | | |
usr bin lib u
| |
-------------- ----------------------------
| | | | |
lib md1 ac aa dr
SYS2TREE
/
|
--------------------------------------
| | | |
usr bin lib u
| |
------------------------- ----------------------------
| | | | |
ac1 lib md1 ac aa dr
SYS3TREE
/
|
--------------------------------------
| | | |
usr bin lib u
| |
------------ ----------------------------
| | | | |
ac1 lib ac aa dr
GO
The command /etc/mvdir is an executable file (shell script)
used to rename or move directories WITHIN a file system.
(You cannot move directories to another file system.)
You must be logged in as root to use this command.
The mvdir syntax is shown above.
NOTE: The mvdir command, unlike the mv command, not only
renames the directories, but actually moves the files
from the source directory into the destination directory.
Look at the figure above. /u and /usr are separate file systems.
You CANNOT move directories from the /usr file system to the /u
file system or vice versa using mvdir.
Let us assume that you want to move
the entire contents of the /usr/md1
directory into a directory called
/usr/ac1. First let us check the
contents of the /usr/md1 directory
using the ls -C command!
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type ls -C /usr/md1
Please type ls -C /usr/md1
You will be helped this time!
$PROMPT$
FORGET1
ls -C /usr/md1
Please observe a typical result
above.
CTI admin games 861 862 sys
adm 842 include startup tmp
Now, let us move the /usr/md1
directory into the /usr/ac1
directory, by entering the
appropriate command:
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type mvdir /usr/md1 /usr/ac1
Please type mvdir /usr/md1 /usr/ac1
You will be helped this time!
$PROMPT$
FORGET2
mvdir /usr/md1 /usr/ac1
$PROMPT$
Please observe the result above:
If you get no diagnostic messages,
from /etc/mvdir, you can rest
assured that the old directory and
all its files were moved to the new
directory. Use the ls -C /usr/ac1
command to verify this that the
files were indeed moved to /usr/ac1.
$PROMPT$
That is correct!
You've got it on the 2nd try.
Good, you understand the concept.
Please type ls -C /usr/ac1
Please type ls -C /usr/ac1
You will be helped this time!
FORGET3
ls -C /usr/ac1
Please observe the result above!
$PROMPT$
CTI admin games 861 862 sys
adm 842 include startup tmp