home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 May / W2KPRK.iso / apps / posix / source / MAN / LN.PRT < prev    next >
Text File  |  1999-11-17  |  2KB  |  67 lines

  1.                                                            LN (1)
  2.  
  3. NAME
  4.  
  5.   ln - make links
  6.  
  7. SYNOPSIS
  8.  
  9.   ln [ s ] source_file [  ] ln [ s ] source_file ... [  ]
  10. DESCRIPTION
  11.  
  12.   The ln utility creates a  new  directory  entry  (linked  file)
  13. which  inherits the same modes as the orginal file.  It is useful
  14. for maintaining multiple copies of a file in many places at  once
  15. -  without the `copies'; instead, a link `points' to the original
  16. copy.  There are two types of  links;  hard  links  and  symbolic
  17. links.   How  a link `points' to a file is one of the differences
  18. between a hard or symbolic link.
  19.   Option available:
  20.      s - Create a symbolic link.
  21.   By default ln makes links.  A hard link to a file is  indistin-
  22. guishable  from  the  original  directory entry; any changes to a
  23. file are effective independent of the name used to reference  the
  24. file.  Hard links may not refer to directories (unless the proper
  25. incantations are supplied) and may not span file systems.
  26.   A symbolic link contains the name of the file to  which  it  is
  27. linked.   The  referenced file is used when an open (2) operation
  28. is performed on the link.  A stat (2) on a symbolic link will re-
  29. turn  the linked-to file; an lstat (2) must be done to obtain in-
  30. formation about the link.  The readlink (2) call may be  used  to
  31. read  the  contents  of a symbolic link.  Symbolic links may span
  32. file systems and may refer to directories.
  33.   Given one or two arguments, ln creates a link  to  an  existing
  34. file  source_file  .  If  target_file is given, the link has that
  35. name; target_file may also be a directory in which to  place  the
  36. link;  otherwise  it is placed in the current directory.  If only
  37. the directory is specified, the link will be  made  to  the  last
  38. component of source_file .
  39.   Given more than two arguments, ln makes links in target_dir  to
  40. all  the  named  source files.  The links made will have the same
  41. name as the files being linked to.
  42. SEE ALSO
  43.  
  44.   rm (1) , cp (1) , mv (1) , link (2) , readlink (2) , stat (2) ,
  45. symlink (2)
  46. HISTORY
  47.  
  48.   A ln command appeared in
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.