Home > Archive > Linux/Unix > August 2002 > Links (ln)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Links (ln)
Boulware5

2002-08-22, 11:34 pm

I'm a little confused over hard links. The examcram book, while not explicitly saying it, tends to say the format for setting one up is one way while the Slackware user-guide (BTW, slackware is a great distro ) says it's another. That's how I am interpretting it at least. I'm wondering if this is a mistake in the examcram book or if it's just me.


Examcram
ln [what to call the link] [target of link] <== Now it doesn't say this word for word but that's how I make it out after reading their description on page 145.

ex: ln /bin/wp /opt/WordPerfect7

Slackware guide
However, here it says the first option (after ln) is the target of the link and the final option is what to call the link

ex:
ln /var/media/mp3 ~/mp3
Supertech

2002-08-23, 7:03 am

Symbolic links are a way of having multiple names for the same file, without having two copies on disk. There are two types, hard and soft. A hard symbolic link must reside on the same filesystem as the original file, because the filesystem considers the files the same. A soft link is used more often, because it can cross filesystems and refer to directories.

ln -s /usr/bin/telnet /usr/local/bin/telnet

creates a link, called telnet, in /usr/local/bin, which points to /usr/bin/telnet (note the order: source file then destination file). Omitting the -s would create a hard link.
ccieToBe

2002-08-23, 12:40 pm

The way I remember this is that most utilities for which an existing, and new destination are arguments (cp, mv, ln...) have you give the existing file/directory first, and the new file/directory second.
Mr. Linux Guy

2002-08-26, 7:19 am

Ok, when you see a possible contradiction in a book, the best thing to do is to go to your systems documentation (i.e., manpages) and look there. Having said that, however, the usual syntax for a command in Unix is like this:

command options target-file destination-file

You may want to think of an invisible "to" as being between the target and destination files, like so:

ln ~lejeuner/bin/quad [to] ~hammonst/bin/solver

This might help you remember the syntax a little better. Also be warned of many ExamCram and other certification books: they are often rushed to print and very often the proofreaders are not techies, so can't check for the technical accuracy of the information. If something sounds fishy, it probably is.
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2009 examnotes.net