To link a filesystem to a directory


 
Thread Tools Search this Thread
Operating Systems AIX To link a filesystem to a directory
# 1  
Old 08-11-2005
To link a filesystem to a directory

Hi, I was wondering if someone can help me out with one of my simple problems. I have a filesystem, /oracle/dir1/sapdataA. The client has the filesystem /oracle/dir1/sapdata1. Now I want to link these 2 directories so that if I cd to /oracle/dir1 and do an ls -l I get the following output:

cd /oracle/dir1
ls -l ---->

lrwxrwxrwx 1 root system 8 Oct 20 2004 sapdata1 -> sapdataA


How can I do that? Please help me out!!!.

Thanks and regards.
# 2  
Old 08-21-2005
Sorry, I did not quite understand your problem.
You have two file systems mounted in the direcories sapdata1 and sapdataA which are in the directory /oracle/dir1, right?
Both sapdata1 and sapdataA are real directories, not links.
What do you see now when you do this:
cd /oracle/dir1
ls -l
?
Could you please email me if you answer. I am not visiting the site often.
# 3  
Old 08-22-2005
man ln

I suspect odashe is right and you have two actual directories, not 1 directory and one link.

in case you have /oracle/dir1/sapdataA as a real directory and want to create a link named sapdata1 type:

Code:
ln -s /oracle/dir1/sapdataA /oracle/dir1/sapdata1

This would yield the desired (?) result as in: the output you stated to want to get. In case you already have a directory /.../sapdata1 this will of course fail as the directory already exists. The link creates basically a directory entry saying "this is me, over there". Similarily for files, etc.

Hope this helps
bakunin
# 4  
Old 09-29-2005
First export "/oracle/dir1/sapdataA" as NFS on the server .
Second,import this filesystem on the client.
Third using "ln" command makes the link between "/oracle/dir1/sapdataA" and "/oracle/dir1/sapdata1" on the client
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Mounting a directory in a filesystem

Hi All, Recently I came to know my / root file system is getting full because of application directory /siebel/ I have one option. 1) Down the application , take full backup 2)change the filesystem ownership 2)copy the contents into that filesystem cp -pr /siebel/* /siebelfs/* 3)Inform... (9 Replies)
Discussion started by: Thala
9 Replies

2. Solaris

Create a Link for a directory

Hi, I need to create a link as stagein01 for the /p11/prod/stagein01/. Please let me know the procedure for the same. Regards, VN (5 Replies)
Discussion started by: narayanv
5 Replies

3. Shell Programming and Scripting

HELP on checking for directory or symbolic link

Hi, Can anyone please advise why the following is not working as I expected it to be? Test script as below: #!/bin/ksh for checkdir in dir* do echo "Checking ${checkdir}" if ; then echo "... ${checkdir} is a directory" elif Output from sample run as below: $:... (8 Replies)
Discussion started by: newbie_01
8 Replies

4. UNIX for Dummies Questions & Answers

Symbolic link for an existing directory

Hi , i am trying to make a symbolic link for an existing directory, but i am facng some problems regarding the usage of command. If there is no directory i can make a symbolic link, but for an existing directory i am not able to. can anyone post me the exact usage if we already have the... (1 Reply)
Discussion started by: sahasra
1 Replies

5. UNIX for Advanced & Expert Users

Hard link a directory

Is it possible to Hard link a directory? Some people on google say it is possible and some say it is not possible. I haven't seen a working solution though. (3 Replies)
Discussion started by: cokedude
3 Replies

6. AIX

link directory across server

Hi All, I have directory "A" on server "1". I also have directory "B" on Server "2" I need to link these 2 directories "A" and "B" which are across servers. Is it possible? If so, can somebody help me on this? Thanks in advance. Mugundan (2 Replies)
Discussion started by: mjdarm
2 Replies

7. UNIX for Dummies Questions & Answers

Link to a directory

Hi Experts, Is there any way to link the contents (subdirectories/files) of a existing directory A to another existent directory B.. The relative path of /root/Directory A/ Directory A |__ Subdirectory A1 |__File A |__File B |__ Subdirectory A2 |__File A ... (6 Replies)
Discussion started by: ganga.dharan
6 Replies

8. Solaris

soft link for directory in root FS

Hi, In root folder there is one directory "/usr/sap/P38/TRX00/index" as the data is going to increase so to aviod root fs become 100% full ,we have to create one soft link that would point to another point mount created with on same disk ultimatly that New Fs(/test) will store data instead of... (2 Replies)
Discussion started by: solaris123
2 Replies

9. AIX

Filesystem creation over existing Directory

Is it possible to create a Filesystem with the mount point over an existing Directory, without loosing the data in the Directory? eg:- /u01 -> /pmmpd/u01 (Directory with soft link) /pmmpd/u01 (Need to create this filesystem, without loosing data) Thanks TheDoc (0 Replies)
Discussion started by: TheDoc
0 Replies

10. Shell Programming and Scripting

how link directory

I want to link directory to another directory pls confirm whether i am doing correct or not I want to link test directory to another hist directory /users/test/ ln -s /users/hist pl confirm (1 Reply)
Discussion started by: getdpg
1 Replies
Login or Register to Ask a Question