I have no uptime-command
I have problems with my tape drive
Frequently Asked Questions and their answers
Top
6.6. What do I need to know about softlinks?
A softlink is basically a pointer to a file or subdirectory that
redirects normal unix subdir tree processing to other places.
Let's use some examples to clarify the use of softlinks.
Above, we talked about building the kernel under netbsd environment.
Well, if you had made only a 50M /usr partition like I did, there
is NOT enough room to untar and build the bsdsyssrc.tgz (kernel).
Using softlinks, you can put the bsdsyssrc stuff on your /opt
partition (where I put mine) and fake unix into thinking it is
in /usr/src/sys.
Here's how to do it:
- cd /usr
- mkdir src
- cd src
- ln -s /opt/sys sys
Now do:
- ls -laF
and you will see something like:
- sys@ -> /opt/sys
Now you can just:
- cd /opt
- tar xzvfp /dev/rst0
and untar the bsdsyssrc there. It will make a /opt/sys for you.
Now if you:
- cd /usr/src/sys
you have really done:
- cd /opt/sys
Another use for softlinks. I recommend this, actually. I put all
my amiga (CBM) header files on tape, then untarred them to /opt/cbm
then I made a link:
- ln -s /opt/cbm /cbm
Now I can:
- cd /cbm
and get to my headers. I also put font files in /cbm/fonts. For
example, /cbm/fonts/topaz.c is the output of dumpfont (run that
under amigaos) to create a topaz font for kernel compiling. I also
have a /cbm/fonts/mach.c for the kernel_font.c.distrib and a cedfont.c
for a cedfont I made. In the kernel source tree, I did:
- cd /usr/src/sys/arch/amiga/dev
- ln -s /cbm/fonts/topaz.c kernel_font.c
And when I build the kernel, it uses topaz.c to make the font for the
console. Slick? :-)
I hope you get the idea now. One thing that took me a while to get
straight is the ORDER of the names on the ln command line :-)
Just remember:
- ln -s {ORIGINAL} {LINK}
and alphabetically, ORIGINAL is before LINK :-) (Just like the
cp-command)
Matthias Kirschnick 04/15/94