Sponsored Content
Top Forums UNIX for Dummies Questions & Answers SSI related Unix In (link) support needed Post 302543634 by DGPickett on Monday 1st of August 2011 01:38:18 PM
Old 08-01-2011
The 'ln -s' command creates a symbolic link.

A UFS device is a pile of inodes, some directory, some file, device, named pipe or symbolic link.
https://www.unix.com/man-page/All/2/STAT/
https://www.unix.com/man-page/All/7/symlink/

A directory is just a pile of entry names and inode numbers (for same device as directory inode). If an inode number is in more than one directory, it is hard linked. Every directory /x/y/dir_name has '/x/y/dir_name/.' hard linked to '/x/y/dir_name and every child dir '/x/y/dir_name/*/..' ! Otherwise, directories cannot be hard linked, but other inodes can be mentioned in two directories, and so be hard linked.

Soft link is creating an inode marked as sym-link containing a path, either relative or absolute. The target might not exist. Some commands traverse the soft link, others look at the link itself. You can soft link either a file or a directory, anything, across devices or within. The resouce you want to soft link has to be mounted locally on that host, and then you can soft link it to be references anywhere. I used to have a web supported dir in mu home dir, $HOME/pub_html/ or something such, and to get out, I used symlinks. Same for FTP web access that presented my home dir as root, just 'ln -s $HOME/root /' and navigate through /root/!

Last edited by DGPickett; 08-01-2011 at 02:45 PM..
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Support Needed: Education On Hold

I'm Presently Writting A College Report On Operating Systems, Not Enjoying It Very Much. I Was Hoping Someone Could Direct Me To A Site Where I Could Get Information Such As The Role Of Operating Systems, Types Of Operating Systems (Multi-User Multi-Tasking etc), Modes Of Operating systems... (3 Replies)
Discussion started by: OSNovice
3 Replies

2. UNIX for Dummies Questions & Answers

the unix answer to SSI?

On websites I build one thing I like to use is SSI to make it easier for the owner of the site to update parts of it him/herself. So the text of a page is keep in a simple .txt file, which the main page calls. Unix does not support this (I'm told), is there a similar system I can use with UNIX?... (1 Reply)
Discussion started by: garrettcarr
1 Replies

3. UNIX for Dummies Questions & Answers

Difference between hard link and soft link in unix

Hi All, Can any one please explain me what is the difference between hard link and soft link in UNIX. Thanks in advance Raja Chokalingam. (2 Replies)
Discussion started by: RAJACHOKALINGAM
2 Replies

4. Shell Programming and Scripting

needed very good link for Shell script

I am new to shell script.I need a link which explains basic concepts for shell scrpting (1 Reply)
Discussion started by: rajareddy_24
1 Replies

5. UNIX for Dummies Questions & Answers

scanner does not support UFS? Help needed!

Hello, I hope somebody can help me. I have a new scanner, that says this: "EPSON Scan does not support the UNIX File System (UFS) for Mac OS X. You must install EPSON Scan on a disk or in a partition that does not use UFS." I have UFS.. is there anything I can do? How do I create/find such a... (0 Replies)
Discussion started by: Hannako
0 Replies

6. Shell Programming and Scripting

need downloading related help...but its not related to unix

Hi All, I am trying to dowmload the zip file "zkManageCustomers.zip " but i dont have access. Can anyone help me to download this file See the below link- http://www.ibm.com/developerworks/opensource/library/wa-aj-open/index.html?ca=drs- Please help me as early as... (1 Reply)
Discussion started by: aish11
1 Replies

7. Shell Programming and Scripting

Idea needed regarding process related script

I want to write a script which will take two time as input parameters and display the details of running processes between the two times, any ideas about the script ? (6 Replies)
Discussion started by: sandip250382
6 Replies

8. Shell Programming and Scripting

Question related to bash. Your help needed.

Dear Team, i have one question related to automation of adding new users based on txt file. Here we go: I have data.txt file which shows: bang dang benc One by one, after pressing enter. And now, I need scirpt which will add those users with home directory hidden within the file... (7 Replies)
Discussion started by: protos27
7 Replies
LN(1)							    BSD General Commands Manual 						     LN(1)

NAME
ln -- make links SYNOPSIS
ln [-fhinsv] source_file [target_file] ln [-fhinsv] source_file ... target_dir DESCRIPTION
The ln utility creates a new directory entry (linked file) which has the same modes as the original file. It is useful for maintaining mul- tiple copies of a file in many places at once without using up storage for the ``copies''; instead, a link ``points'' to the original copy. There are two types of links: hard links and symbolic links. How a link ``points'' to a file is one of the differences between a hard or symbolic link. The options are as follows: -f Unlink any already existing file, permitting the link to occur. -h If the target_file or target_dir is a symbolic link, do not follow it. This is most useful with the -f option, to replace a symlink which may point to a directory. -i Cause ln to write a prompt to standard error if the target file exists. If the response from the standard input begins with the char- acter 'y' or 'Y', then unlink the target file so that the link may occur. Otherwise, do not attempt the link. (The -i option over- rides any previous -f options.) -n Same as -h, for compatibility with other ln implementations, namely GNU coreutils. -s Create a symbolic link. -v Cause ln to be verbose, showing files as they are processed. By default ln makes hard links. A hard link to a file is indistinguishable from the original directory entry; any changes to a file are effective independent of the name used to reference the file. Hard links may not normally refer to directories and may not span file sys- tems. A symbolic link contains the name of the file to which it is linked. The referenced file is used when an open(2) operation is performed on the link. A stat(2) on a symbolic link will return the linked-to file; an lstat(2) must be done to obtain information about the link. The readlink(2) call may be used to read the contents of a symbolic link. Symbolic links may span file systems and may refer to directories. Given one or two arguments, ln creates a link to an existing file source_file. If target_file is given, the link has that name; target_file may also be a directory in which to place the link; otherwise it is placed in the current directory. If only the directory is specified, the link will be made to the last component of source_file. Given more than two arguments, ln makes links in target_dir to all the named source files. The links made will have the same name as the files being linked to. SEE ALSO
link(2), lstat(2), readlink(2), stat(2), symlink(2), symlink(7) STANDARDS
The ln utility conforms to IEEE Std 1003.2-1992 (``POSIX.2''). The -v option is an extension to IEEE Std 1003.2-1992 (``POSIX.2''). HISTORY
A ln utility appeared in Version 6 AT&T UNIX. BSD
October 29, 2007 BSD
All times are GMT -4. The time now is 12:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy