How to change directories?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to change directories?
# 1  
Old 11-09-2012
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,
# 2  
Old 11-09-2012
Need more info

The cd command changes directories.
Are you trying to rename the directories?
# 3  
Old 11-09-2012
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
# 4  
Old 11-09-2012
assuming that there are persmissions, try:
Code:
mkdir /users/saanvi
mv /opt/multifamily/restatement/weblogic /users/saanvi

# 5  
Old 11-09-2012
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
# 6  
Old 11-09-2012
Directories can only be renamed under the current parent directory. A restructure (moving the directory to another parent directory) requires a "mv" command.
# 7  
Old 11-09-2012
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
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to change Permissions on files and directories

Hey, It's me again. Have a problem, that's not really a problem. I have the below script, that goes to the directory I want it to go to. lists out the directories available, lets you choose the directory you want, then it changes the permissions on said directory. using chmod -R and chown -R. ... (2 Replies)
Discussion started by: gkelly1117
2 Replies

2. Shell Programming and Scripting

Using ".." to change directories in a ksh script

I have an issue driving me bonkers. I have a ksh script that requires changing directories. If a argument "TEST" is passed in, this is a regression test execution of the script (as opposed to production execution). I have a directory entitled "TEST" that is located three directory locations ABOVE... (14 Replies)
Discussion started by: joe cipale
14 Replies

3. UNIX for Dummies Questions & Answers

Change chmod on files in diff directories

I am looking for a small script to crawl through several directories and change a couple of files in each directory to read write status. Anyone have any ideas ? (5 Replies)
Discussion started by: zapper222
5 Replies

4. UNIX for Dummies Questions & Answers

How to get directories colored when doing change directory and tab

I am trying to navigate between directories using cd. However, the only way to distinguish directories now is by seeing the "/' after the directory names, which is quite inefficient. How can I make the directories look in color when typing cd and then using the tab key to list the files and... (1 Reply)
Discussion started by: genehunter
1 Replies

5. UNIX for Dummies Questions & Answers

using dots to change directories

how would i go down a directory using the ../.. (6 Replies)
Discussion started by: JamieMurry
6 Replies

6. UNIX for Dummies Questions & Answers

how to change permissions only to files, not directories....?

Hi, I am really new to unix, any help is much appreciated. I need to change permissions of all files under several subdirectories to 700 but keep directories readable (755). Why ? Because I need a FTP user to only list his files and can't read them. But to browse to subfolder, the directories... (3 Replies)
Discussion started by: narrok
3 Replies

7. UNIX for Dummies Questions & Answers

Batch Renaming: Change files' extensions in many sub-directories

Hi all - I'm trying to rename a large number of files all at once and need some help figuring out the command line syntax to do it. I've already done quite a bit of research with the rename and mv commands, but so far haven't found a solution that seems to work for me. So: The files exist... (10 Replies)
Discussion started by: dave920
10 Replies

8. Shell Programming and Scripting

Change permission for directories and files

Is there a way to change subdirectories permission plus the files in the subdirectories in a directory i specified without using the find command? (1 Reply)
Discussion started by: mingfei2006
1 Replies

9. Shell Programming and Scripting

how to change working directories in perl?

i am new to perl. i am writing a perl script. i want to know how to change the working directories? for ex. i have a perl script in c:\proj\ . i want to run this script in this directory but i need my script to change its working directory to D:\xyz\ dynamically in the script. your help is... (1 Reply)
Discussion started by: megastar
1 Replies
Login or Register to Ask a Question