How to change directories?

Hi,

I am changing my directory structure

/opt/multifamily/restatement/weblogic

to

/users/saanvi/weblogic

Am using sed command to changing the directoried names
Please hepme out on this. there is any script to change the directories.

Thanks in Advance,

The cd command changes directories.
Are you trying to rename the directories?

Hi ,

its just like renaming the directories.

Iam copy this directory to the other server.

therer's is a different naming convention.

few files its using old directories name. i want to change to new dirctories by using script .

thankyou

assuming that there are persmissions, try:

mkdir /users/saanvi
mv /opt/multifamily/restatement/weblogic /users/saanvi

I am using sed "s/multifamily/$v/g" "${f}" > ${f}.txt

by using this command i am planning to change the directories name

from /opt/multifamily/restatement/weblogic

to
/users/saanvi/weblogic

Thanks,
swathi

Directories can only be renamed under the current parent directory. A restructure (moving the directory to another parent directory) requires a "mv" command.

thanks for quick reply ... old directory name its using number of configuration files.

we are copying our weblogic installtion to other server .there's is a differnt directory structure.

old configuration is /opt/multifamily/restatement/weblogic
every thing it has to sit under

/users/saanvi/weblogic

For copying weblogic directory to another server under /users/saanvi/

scp -r /opt/multifamily/restatement/weblogic user@server.com:/users/saanvi/

Replace highlighted text with your destination user & server name.

Hi bipinajith,

I don't have issue in copying weblogic to other server.

old directories structure is sitting under configuration file.

. I have to change the configurion files nearly 30 to files.

Thanks,

Using awk:-

awk -F"weblogic" ' /weblogic/ { $1="/users/saanvi/"; print $1"weblogic"$NF; } ' config_file