From: Jim Meyering Date: Tue, 7 Jun 2005 06:40:40 +0000 (+0000) Subject: (ln invocation): Examples, from Bob Proulx. X-Git-Tag: CPPI-1_12~653 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52e93d57016911e022d4077e098c3a8584f386ae;p=thirdparty%2Fcoreutils.git (ln invocation): Examples, from Bob Proulx. --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index dd019422b6..4b2fe80a7e 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -7741,14 +7741,29 @@ Print the name of each file before linking it. Examples: @smallexample -# Create link ./name pointing to /some/name. -ln -s /some/name +Bad Example: -# Create link ./myname pointing to /some/name. -ln -s /some/name myname +# Create link ../a pointing to a in that directory. +# Not really useful because it points to itself. +ln -s a .. -# Create links ../a and ../b pointing to ./a and ./b. -ln -s a b .. +Better Example: + +# Change to the target before creating symlinks to avoid being confused. +cd .. +ln -s adir/a . + +Bad Example: + +# Hard coded paths don't move well. +ln -s $(pwd)/a /some/dir/ + +Better Example: + +# Relative paths survive directory moves and also work across +# networked filesystems. +ln -s afile anotherfile +ln -s ../adir/afile yetanotherfile @end smallexample