Sponsored Content
Full Discussion: Link to a directory
Top Forums UNIX for Dummies Questions & Answers Link to a directory Post 302281456 by ganga.dharan on Thursday 29th of January 2009 12:43:38 AM
Old 01-29-2009
Thanks John, The file systems are different. I am testing in two different filesystem, /home/user is one filesystem and /base/projects is another filesystem. But actually, in realtime, the directories are in the same filesystem

Does it mean that the links doesn;t work in different filesystems. Please guide.

I tried as below and i am getting an error when trying to link the directories

user@host:/home/user/wa/directory_A/$ ln /base/projects/directory_A/* /home/user/wa/directory_A
ln: 0653-423 /base/projects/directory_A/Sybase_Scripts is a directory. Cannot hard link.
ln: 0653-423 /base/projects/directory_A/Utilities is a directory. Cannot hard link.
ln: 0653-423 /base/projects/directory_A/action is a directory. Cannot hard link.
ln: 0653-423 /base/projects/directory_A/bin is a directory. Cannot hard link.
ln: 0653-423 /base/projects/directory_A/generalLedger is a directory. Cannot hard link.
ln: 0653-423 /base/projects/directory_A/hedgeScenarios is a directory. Cannot hard link.
ln: 0653-423 /base/projects/directory_A/instSource is a directory. Cannot hard link.
ln: 0653-423 /base/projects/directory_A/sqlsource is a directory. Cannot hard link.
ln: 0653-423 /base/projects/directory_A/tk is a directory. Cannot hard link.
 

10 More Discussions You Might Find Interesting

1. AIX

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... (3 Replies)
Discussion started by: brookingsd
3 Replies

2. 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

3. 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

4. Web Development

html link to images in /tmp directory

Because of permission issues, I need to link to images in my web page which are stored in /tmp which of course is located in the root directory but my actual html page is much further down in another directory. I thought the the following code should work, but the image comes up as a broken link:... (2 Replies)
Discussion started by: Solerous
2 Replies

5. 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

6. 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

7. 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

8. Post Here to Contact Site Administrators and Moderators

Broken Links in the Site Link Directory

(split from another thread) Hi. Can you please post a copy of the exact link you used? I have no trouble accessing either the readme, or the link to "Featured Books and Articles by Active Forum Members - Links" Thanks. (2 Replies)
Discussion started by: Scott
2 Replies

9. 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

10. 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
link(2) 							System Calls Manual							   link(2)

NAME
link() - link to a file SYNOPSIS
DESCRIPTION
The system call creates a new link (directory entry) for the existing file. path1 points to a path name naming an existing file. path2 points to a path name naming the new directory entry to be created. RETURN VALUE
Upon successful completion, returns zero. Otherwise, it returns -1 and sets (see errno(2)) to indicate the error. ERRORS
The system call fails and no link is created if one or more of the following is true: A component of either path prefix denies search permission. The requested link requires writing in a directory that does not permit writing. The user's or group's disk quota block limit has been reached for this file system. The link named by path2 exists. path points outside the allocated address space of the process. The reliable detection of this error is implementation dependent. Too many symbolic links were encountered in translating either path name. The maximum number of links to a file would be exceeded. Either the specified path exceeds bytes, or a component of either specified path exceeds while is in effect. The file named by path1 does not exist. A component of either path prefix does not exist. path2 points to a null path name. path1 or path2 is null. The directory to contain the file cannot be extended. A component of either path prefix is not a directory. The file named by path1 is a directory and the effective user ID is not a user who has appropriate privileges. Some file systems return this error whenever path1 names a directory, regardless of the user ID. The requested link requires writing in a directory on a read-only file system. The link named by path2 and the file named by path1 are on different logical devices (file systems). SEE ALSO
cp(1), link(1M), symlink(2), unlink(2), symlink(4), privileges(5). STANDARDS CONFORMANCE
link(2)
All times are GMT -4. The time now is 11:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy