lns -- a friendly program for making symbolic links
lns target-filespec symlink-filespec or lns symlink-filespec target-filespec
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.
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 "."
Currently, the only command-line option is
lns -v, which prints the lns version number and aborts.
The man page for ln.
If this program acts up, email me about it, at
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?
Sean M. Burke,