Download here

NAME

lns -- a friendly program for making symbolic links

SYNOPSIS

  lns target-filespec symlink-filespec
   or
  lns symlink-filespec target-filespec

DESCRIPTION

It's easy to make mistakes when you're using ln -s to make symlinks. So use this program, lns, instead -- it's basically ln -s plus lots of sanity-checking and DWIM ("do what I mean"). Notably, it doesn't care whether you say lns target symlink or lns symlink target.

EXAMPLE USES

Here's a short example session containing attempts to use lns to make some symlinks:

  % ls -l
  -rw-r--r--  1 sburke dongs 5235 Feb 29 20:52 stuff.html
  
  % lns stuff.html index.html
  Made index.html -> stuff.html
  
  % ls -l
  lrwxr-xr-x  1 sburke dongs   10 Feb 29 22:43 index.html -> stuff.html
  -rw-r--r--  1 sburke dongs 5235 Aug 19 22:43 stuff.html

  % lns funk.txt fank.dat
  But neither funk.txt nor fank.dat exist!

  % lns index.html stuff.html
  But both index.html and stuff.html already exist.
  Maybe rm the symlink index.html (->stuff.html)?

  % lns . foo
  lns doesn't allow symlinking to or from "."

OPTIONS

Currently, the only command-line option is lns -v, which prints the lns version number and aborts.

SEE ALSO

The man page for ln.

BUG REPORTS

If this program acts up, email me about it, at sburke@cpan.org.

COPYRIGHT AND DISCLAIMER

Copyright (c) 2004 Sean M. Burke. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. (See perlartistic and perlgpl.)

The program and its documentation are distributed in the hope that they will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. But let me know if it gives you trouble, okay?

AUTHOR

Sean M. Burke, sburke@cpan.org.

SCRIPT CATEGORIES

UNIX/System_administration

CHANGE LOG

v2.01 2004-08-20

First CPAN release, after maybe four years of using it on my own and passing it around to friends. All that's new in this version is the documentation, and the "-v" option.