Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ln(1) [minix man page]

LN(1)							      General Commands Manual							     LN(1)

NAME
ln, clone - create a link to a file SYNOPSIS
ln [-ifmrRvx] file [name] ln [-ifrRvx] file ... dir clone [-ifmvx] file [name] OPTIONS
-i Ask if ok to remove a file -f Remove existing links -m Merge trees, disable the into-a-directory trick -rR Recursively link a directory tree -v Display what ln is doing -x Do not cross device boundaries EXAMPLES
ln file newname # Make newname a synonym for file ln /usr/games/chess # Create a link called chess DESCRIPTION
A directory entry is created for name . The entry points to file . Henceforth, name and file can be used interchangeably. If name is not supplied, the last component of file is used as the link name. If more than one file is supplied or the name refers to an existing direc- tory, links will be created in that directory. An existing name will not be removed unless the -i or -f flag is specified. Clone is a convenient synonym for ln -fmr to create a so-called "link farm", a directory full of links to the original tree. SEE ALSO
cp(1), link(2), unlink(2). LN(1)

Check Out this Related Man Page

link(1) 						      General Commands Manual							   link(1)

NAME
link, unlink - Creates an additional directory entry for an existing file SYNOPSIS
link file1 file2 unlink file STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: link: XCU5.0 unlink: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The link command performs the link() system call to create an additional directory entry for an existing file, file1. In effect, the underlying file then has two names, file1 and file2 (either of these arguments can be a pathname). The old and new entries share equal access rights to the underlying file. The unlink command performs the unlink() system call to remove a link to file created by link. The unlink command removes the directory entry specified by the file parameter and, if the entry is a hard link, decrements the link count of the file referenced by the link. You should be familiar with the link() and unlink() system calls before you use these commands. The link and unlink commands do not issue error messages when the associated system call is unsuccessful. NOTES
The link and unlink commands cannot be used to link and unlink directories. EXIT STATUS
The link and unlink commands both exit with the following: The link() or unlink() system call succeeded. Too few or too many arguments specified. The link() or unlink() system call failed. SEE ALSO
Commands: fsck(8), ln(1) Functions: link(2), unlink(2) link(1)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

exporting a directory

How do I export a directory ? I am trying to link the directory from another machine. (2 Replies)
Discussion started by: brv
2 Replies

2. UNIX for Dummies Questions & Answers

questions with links

hard links 1) why isnt it possible to link across file system boundaries 2) when we removed one link , how will the other link be affected? symbolic links 1) why is it possible to create symbolic links but not hard links across file system boundaries? thanks (2 Replies)
Discussion started by: yls177
2 Replies

3. Shell Programming and Scripting

a script to clone a dir tree, & overwrite the dir struct elsewhere?

hi all, i'm looking for a bash or tcsh script that will clone an empty dir tree 'over' another tree ... specifically, i'd like to: (1) specify a src directory (2) list the directory tree/hiearchy beneath that src dir, w/o files -- just the dirs (3) clone that same, empty dir hierarchy to... (2 Replies)
Discussion started by: OpenMacNews
2 Replies

4. UNIX for Dummies Questions & Answers

problem with directory

:) :) hi gurus, I have created a directory called "Proj" in the root directory. I then created a file called "dboper.prg" in that directory. I have given file permissions and directory permissions . But when executing the file dboper.prg ($ dboper.prg) from being in the proj directory,i am ... (2 Replies)
Discussion started by: ravi raj kumar
2 Replies

5. UNIX for Dummies Questions & Answers

HP-UX 11.23 ia64 and Glance

I've been searching and cannot seem to find anywhere online a link to a manual for Glance. Does anyone have a link to this? I searched in here already and the links I found on a post from 2002 were dead. And more to the point, do you know if you can use Glance to see Disk I/O per logical... (2 Replies)
Discussion started by: LisaS
2 Replies

6. UNIX for Dummies Questions & Answers

Remove all links

How can I remove all links (and just the links) from a file hierarchie (recursively)? With unlink I don't see any possibility to do that. Thanks! (4 Replies)
Discussion started by: borobudur
4 Replies

7. UNIX for Advanced & Expert Users

home directory links

I need to put a soft link in each users home directory that is somethink like this workspace --> /vol/workspace Any suggestions what is the easiest way to accomplish this? (3 Replies)
Discussion started by: frankkahle
3 Replies

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

9. UNIX for Dummies Questions & Answers

Create shortcut to a directory in unix

Hello, I am having a problem to create a shortcut in a directory linked to another directory in my home directory. For example, I would like to create a shortcut 'outputs', which directly links to the real 'outputs' in my home directory. So, I was wondering if ln is the correct command in this... (5 Replies)
Discussion started by: hemresis
5 Replies

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

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

12. UNIX for Advanced & Expert Users

Cannot create a link with the same name

Hi - Our system admin cannot create a link to NAS with one particular name but he can create with other names. What might be the cause? Regards ---------- Post updated at 11:30 AM ---------- Previous update was at 11:29 AM ---------- It says permission denied. (2 Replies)
Discussion started by: w020637
2 Replies

13. Homework & Coursework Questions

Linux copy directory without using cp -r or any variant

Hi guys, I need a solution to copy files and folders without using cp-r , cp-R or any variants. So i need to code it manually. I allready have a loop Avans Highschool Breda the Netherlands #!bin/bash IFS=$'\n' if test "$1" = "" then wd=pwd else wd=$1 fi ... (7 Replies)
Discussion started by: Wolverine89
7 Replies

14. UNIX for Dummies Questions & Answers

The number of links, output of ls

hi: i am trying to understand the concept of the output of ls command, specifically "number of links" for a directory and got utterly confused: 1) when i made first directory in my home directory: dave@host:~:$ mkdir dir_l1 from the perspective of home directory, the link number for... (2 Replies)
Discussion started by: ipfreak
2 Replies

15. What is on Your Mind?

Chess Players: Which Online Resources (and Software) Do You Use and Why?

Hi Chess Players, Which Online Resources (and Software) Do You Use and Why? As for me, I use chessgames.com and chessbase.com; but currently I'm using chessgames.com the most; I like exploring openings in the chessgames.com opening explorer. For analysis on the desktop (Mac) or iPhone I... (8 Replies)
Discussion started by: Neo
8 Replies