[BACK]Return to fsu_ln.1 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / othersrc / bin / fsu_ln

Annotation of othersrc/bin/fsu_ln/fsu_ln.1, Revision 1.1

1.1     ! stacktic    1: .\"    $NetBSD$
        !             2: .\" from
        !             3: .\"    NetBSD: ln.1,v 1.22 2007/10/29 11:22:59 jnemeth Exp
        !             4: .\"
        !             5: .\" Copyright (c) 1980, 1990, 1993
        !             6: .\"    The Regents of the University of California.  All rights reserved.
        !             7: .\"
        !             8: .\" This code is derived from software contributed to Berkeley by
        !             9: .\" the Institute of Electrical and Electronics Engineers, Inc.
        !            10: .\"
        !            11: .\" Redistribution and use in source and binary forms, with or without
        !            12: .\" modification, are permitted provided that the following conditions
        !            13: .\" are met:
        !            14: .\" 1. Redistributions of source code must retain the above copyright
        !            15: .\"    notice, this list of conditions and the following disclaimer.
        !            16: .\" 2. Redistributions in binary form must reproduce the above copyright
        !            17: .\"    notice, this list of conditions and the following disclaimer in the
        !            18: .\"    documentation and/or other materials provided with the distribution.
        !            19: .\" 3. Neither the name of the University nor the names of its contributors
        !            20: .\"    may be used to endorse or promote products derived from this software
        !            21: .\"    without specific prior written permission.
        !            22: .\"
        !            23: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
        !            24: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        !            25: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        !            26: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
        !            27: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        !            28: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        !            29: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        !            30: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        !            31: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        !            32: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        !            33: .\" SUCH DAMAGE.
        !            34: .\"
        !            35: .\"    @(#)ln.1        8.2 (Berkeley) 12/30/93
        !            36: .\"
        !            37: .Dd June 17, 2008
        !            38: .Dt FSU_LN 1
        !            39: .Os
        !            40: .Sh NAME
        !            41: .Nm fsu_ln
        !            42: .Nd make links from a file system image through rump
        !            43: .Sh SYNOPSIS
        !            44: .Nm
        !            45: .Op Fl fhinsv
        !            46: .Ar fstype fsdevice source_file
        !            47: .Op Ar target_file
        !            48: .Nm
        !            49: .Op Fl fhinsv
        !            50: .Ar fstype fsdevice source_file ... target_dir
        !            51: .Sh DESCRIPTION
        !            52: The
        !            53: .Nm
        !            54: utility creates a new directory entry (linked file) which has the
        !            55: same modes as the original file on the
        !            56: .Ar fstype
        !            57: file system image contained in
        !            58: .Ar fsdevice .
        !            59: It is useful for maintaining multiple copies of a file in many places
        !            60: at once without using up storage for the
        !            61: .Dq copies ;
        !            62: instead, a link
        !            63: .Dq points
        !            64: to the original copy.
        !            65: There are two types of links; hard links and symbolic links.
        !            66: How a link
        !            67: .Dq points
        !            68: to a file is one of the differences between a hard or symbolic link.
        !            69: .Pp
        !            70: The options are as follows:
        !            71: .Bl -tag -width flag
        !            72: .It Fl f
        !            73: Unlink any already existing file, permitting the link to occur.
        !            74: .It Fl h
        !            75: If the
        !            76: .Ar target_file
        !            77: or
        !            78: .Ar target_dir
        !            79: is a symbolic link, do not follow it.
        !            80: This is most useful with the
        !            81: .Fl f
        !            82: option, to replace a symlink which may point to a directory.
        !            83: .It Fl i
        !            84: Cause
        !            85: .Nm
        !            86: to write a prompt to standard error if the target file exists.
        !            87: If the response from the standard input begins with the character
        !            88: .Sq Li y
        !            89: or
        !            90: .Sq Li Y ,
        !            91: then unlink the target file so that the link may occur.
        !            92: Otherwise, do not attempt the link.
        !            93: (The
        !            94: .Fl i
        !            95: option overrides any previous
        !            96: .Fl f
        !            97: options.)
        !            98: .It Fl n
        !            99: Same as
        !           100: .Fl h ,
        !           101: for compatibility with other
        !           102: .Nm
        !           103: implementations.
        !           104: .It Fl s
        !           105: Create a symbolic link.
        !           106: .It Fl v
        !           107: Cause
        !           108: .Nm
        !           109: to be verbose, showing files as they are processed.
        !           110: .El
        !           111: .Pp
        !           112: By default
        !           113: .Nm
        !           114: makes
        !           115: .Em hard
        !           116: links.
        !           117: A hard link to a file is indistinguishable from the original directory entry;
        !           118: any changes to a file are effective independent of the name used to reference
        !           119: the file.
        !           120: Hard links may not normally refer to directories and may not span file systems.
        !           121: .Pp
        !           122: A symbolic link contains the name of the file to
        !           123: which it is linked.
        !           124: The referenced file is used when an
        !           125: .Xr open  2
        !           126: operation is performed on the link.
        !           127: A
        !           128: .Xr stat  2
        !           129: on a symbolic link will return the linked-to file; an
        !           130: .Xr lstat  2
        !           131: must be done to obtain information about the link.
        !           132: The
        !           133: .Xr readlink  2
        !           134: call may be used to read the contents of a symbolic link.
        !           135: Symbolic links may span file systems and may refer to directories.
        !           136: .Pp
        !           137: Given one or two arguments,
        !           138: .Nm
        !           139: creates a link to an existing file
        !           140: .Ar source_file  .
        !           141: If
        !           142: .Ar target_file
        !           143: is given, the link has that name;
        !           144: .Ar target_file
        !           145: may also be a directory in which to place the link;
        !           146: otherwise it is placed in the current directory.
        !           147: If only the directory is specified, the link will be made
        !           148: to the last component of
        !           149: .Ar source_file  .
        !           150: .Pp
        !           151: Given more than two arguments,
        !           152: .Nm
        !           153: makes links in
        !           154: .Ar target_dir
        !           155: to all the named source files.
        !           156: The links made will have the same name as the files being linked to.

CVSweb <webmaster@jp.NetBSD.org>