Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

lndir(1) [suse man page]

LNDIR(1)						      General Commands Manual							  LNDIR(1)

NAME
lndir - create a shadow directory of symbolic links to another directory tree SYNOPSIS
lndir [ -silent ] [ -ignorelinks ] [ -withrevinfo ] fromdir [ todir ] DESCRIPTION
The lndir program makes a shadow copy todir of a directory tree fromdir, except that the shadow is not populated with real files but instead with symbolic links pointing at the real files in the fromdir directory tree. This is usually useful for maintaining source code for different machine architectures. You create a shadow directory containing links to the real source, which you will have usually mounted from a remote machine. You can build in the shadow tree, and the object files will be in the shadow directory, while the source files in the shadow directory are just symlinks to the real files. This scheme has the advantage that if you update the source, you need not propagate the change to the other architectures by hand, since all source in all shadow directories are symlinks to the real thing: just cd to the shadow directory and recompile away. The todir argument is optional and defaults to the current directory. The fromdir argument may be relative (e.g., ../src) and is relative to todir (not the current directory). Note that BitKeeper, RCS, SCCS, .svn, CVS and CVS.adm directories are shadowed only if the -withrevinfo flag is specified. If you add files, simply run lndir again. New files will be silently added. Old files will be checked that they have the correct link. Deleting files is a more painful problem; the symlinks will just point into never never land. If a file in fromdir is a symbolic link, lndir will make the same link in todir rather than making a link back to the (symbolic link) entry in fromdir. The -ignorelinks flag changes this behavior. OPTIONS
-silent Normally lndir outputs the name of each subdirectory as it descends into it. The -silent option suppresses these status messages. -ignorelinks Causes the program to not treat symbolic links in fromdir specially. The link created in todir will point back to the corresponding (symbolic link) file in fromdir. If the link is to a directory, this is almost certainly the wrong thing. This option exists mostly to emulate the behavior the C version of lndir had in X11R6. Its use is not recommended. -withrevinfo Causes any BitKeeper, RCS, SCCS, .svn, CVS and CVS.adm subdirectories to be treated as any other directory, rather than ignored. DIAGNOSTICS
The program displays the name of each subdirectory it enters, followed by a colon. The -silent option suppresses these messages. A warning message is displayed if the symbolic link cannot be created. The usual problem is that a regular file of the same name already exists. If the link already exists but doesn't point to the correct file, the program prints the link name and the location where it does point. X Version 11 lndir 1.0.1 LNDIR(1)

Check Out this Related Man Page

FS_COPYACL(1)						       AFS Command Reference						     FS_COPYACL(1)

NAME
fs_copyacl - Copies an ACL from a directory to one or more other directories SYNOPSIS
fs copyacl -fromdir <source directory (or DFS file)> -todir <destination directory (or DFS file)>+ [-clear] [-id] [-if] [-help] fs co -f <source directory (or DFS file)> -t <destination directory (or DFS file)>+ [-c] [-id] [-if] [-h] DESCRIPTION
The fs copyacl command copies the access control list (ACL) from a source directory to each specified destination directory. The source directory's ACL is unchanged, and changes to the destination directory's ACL obey the following rules: o If an entry on the source ACL does not already exist on the destination ACL, it is added. o If an entry exists on both the source and destination ACLs, the permissions from the source ACL entry replace the current permissions on the destination ACL entry. o If an entry on the destination ACL has no corresponding entry on the source ACL, it is removed if the -clear flag is included and is unchanged otherwise. In other words, if the -clear flag is provided, the source ACL completely replaces the destination ACL. When using this command to copy ACLs between objects in DFS filespace accessed via the AFS/DFS Migration Toolkit Protocol Translator, it is possible to specify files, as well as directories, with the -fromdir and -todir arguments. CAUTIONS
Do not copy ACLs between AFS and DFS files or directories. The ACL formats are incompatible. OPTIONS
-fromdir <source directory> Specifies the source directory from which to copy the ACL. (Specifying an AFS file copies its directory's ACL, but specifying a DFS file copies its own ACL.) A partial pathname is interpreted relative to the current working directory. -todir <destination directory> Specifies each directory for which to alter the ACL to match the source ACL. (Specifying an AFS file halts the command with an error, but specifying a DFS file alters the file's ACL). A partial pathname is interpreted relative to the current working directory. Specify the read/write path to each directory (or DFS file), to avoid the failure that results from attempting to change a read-only volume. By convention, the read/write path is indicated by placing a period before the cell name at the pathname's second level (for example, "/afs/.abc.com"). For further discussion of the concept of read/write and read-only paths through the filespace, see the fs mkmount reference page. -clear Replaces the ACL of each destination directory with the source ACL. -id Modifies the Initial Container ACL of each DFS directory named by the -todir argument, rather than the regular Object ACL. This argument is supported only when both the source and each destination directory reside in DFS and are accessed via the AFS/DFS Migration Toolkit Protocol Translator. -if Modifies the Initial Object ACL of each DFS directory named by the -todir argument, rather than the regular Object ACL. This argument is supported only when both the source and each destination directory reside in DFS and are accessed via the AFS/DFS Migration Toolkit Protocol Translator. -help Prints the online help for this command. All other valid options are ignored. EXAMPLES
The following example command copies the current working directory's ACL to its subdirectory called reports. Note that the source directory's ACL is unaffected. Entries on the reports directory's that are not on the source ACL of the current directory remain unaffected as well, because the -clear flag is not used. % fs listacl . reports Access list for . is Normal rights: pat rlidwka smith rlidwk Access list for reports is Normal rights: pat rl pat:friends rl Negative rights jones rlidwka % fs copyacl -fromdir . -todir reports % fs listacl . reports Access list for . is Normal rights: pat rlidwka smith rlidwk Access list for reports is Normal rights: pat rlidwka pat:friends rl smith rlidwk Negative rights jones rlidwka PRIVILEGE REQUIRED
To copy an ACL between AFS objects, the issuer must have the "l" (lookup) permission on the source directory's ACL and the "a" (administer) permission on each destination directory's ACL. If the -fromdir argument names a file rather than a directory, the issuer must have both the "l" and "r" (read) permissions on the ACL of the file's directory. To copy an ACL between DFS objects, the issuer must have the r permission on the source directory or file's ACL and the "c" (control) permission on each destination directory or file's ACL. SEE ALSO
fs_listacl(1), fs_mkmount(1), fs_setacl(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 FS_COPYACL(1)
Man Page