Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Aug 2002 11:07:08 +0930
From:      Greg 'groggy' Lehey <grog@lemis.com>
To:        Peter Leftwich <Hostmaster@Video2Video.Com>
Cc:        Jerry McAllister <jerrymc@clunix.cl.msu.edu>, Matthew Seaman <m.seaman@infracaninophile.co.uk>, Jeff Jirsa <jeff@unixconsults.com>, John Bleichert <syborg@stny.rr.com>, FreeBSD LIST <FreeBSD-Questions@FreeBSD.Org>, Roman Neuhauser <neuhauser@bellavista.cz>
Subject:   Re: Links (was: Is simplicity despised? WAS:
Message-ID:  <20020809013708.GC39322@wantadilla.lemis.com>
In-Reply-To: <20020808211403.W85736-100000@earl-grey.cloud9.net> <20020808211101.G85736-100000@earl-grey.cloud9.net> <20020808210908.O85736-100000@earl-grey.cloud9.net>
References:  <20020808234634.GJ8561@wantadilla.lemis.com> <20020808211403.W85736-100000@earl-grey.cloud9.net> <20020808141523.GT281@freepuppy.bellavista.cz> <20020808211101.G85736-100000@earl-grey.cloud9.net> <200208081409.g78E9WG14094@clunix.cl.msu.edu> <20020808210908.O85736-100000@earl-grey.cloud9.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday,  8 August 2002 at 21:10:31 -0400, Peter Leftwich wrote:
> On Thu, 8 Aug 2002, Jerry McAllister wrote:
>> Hi, Because symlinks make it abundantly clear what is linked to what.
>> Hard links can lead to confusion.   I suppose that's not a problem
>> For most of you though.   But, for example, if a person doesn't know
>> which is linked to which, that person wouldn't know that more is
>> really less.  They might think less is really more (if they discovered
>> it at all).   And really, symlinks are not so unbearably wasteful
>> unless you are running some very intensive applications.
>> ////jerry
>
> Which came first, the less or the more?  ;-) 

more.

> Why would intensive apps matter?

I don't understand the question.

> Is it a RAM issue,

No.

> or like Windows shortcuts?

What are they?

On Thursday,  8 August 2002 at 21:12:20 -0400, Peter Leftwich wrote:
> On Thu, 8 Aug 2002, Roman Neuhauser wrote:
>>     No, less is not hardlinked to more, nor is more hardlinked to less.
>>     They're two names for the same file.
>>
>>     So... Yes, you're right: less is really more. But at the same time,
>>     more is less.
>
> This thread leaves one craving simplicity -- anyway, a question.
>
> So can you delete one and not have both disappear?

For some definition of "delete", yes.  UNIX doesn't use the word
"delete".  At the system level, it's unlink.  At the user level, it's
either "unlink" or "remove".  As the name suggests, it removes a link.
The system removes the inode and the data when nothing more (neither a
link nor an open file) references the data.

> I think it would be very quirky and perhaps rude of FreeBSD if a
> user did an `rm more` and less went with it!

Indeed.

On Thursday,  8 August 2002 at 21:21:51 -0400, Peter Leftwich wrote:
> On Fri, 9 Aug 2002, Greg 'groggy' Lehey wrote:
>>> Yup.  But was that file created as less or more
>> Why should you care?
>>> and if I want to make a change do I start with the source for less or more, etc?
>> It's the same source.
>
> Good point(s).
>
>>> Minor maybe, but ln -s makes it clear and is not so onerrous in most situations.
>> No, symlinks impose an order, and they don't clarify, they obfuscate.
>> If you do this, you'll end up with a broken symlink:
>>   $ echo foo > bar
>>   $ ln -s bar baz
>>   $ rm bar
>>   $ cat baz
>>   cat: baz: No such file or directory
>
> Mmm hmm.
>
>> On the other hand, links are *the* basic mechanism for naming files.
>> If you do this, it will work:
>>   $ echo foo > bar
>>   $ ln bar baz
>>   $ rm bar
>>   $ cat baz
>>   foo
>
> Ah haaaaaaa. *lightbulb goes on*
>
>> UNIX files consist of three components: the data, the inode and the
>> name.  The inode is what really describes the file, and where nearly
>> all the information is stored that you see when you run ls -l (only
>
> So on Macs, what is with those hidden DESKTOP and (something else) files
> that store stuff such as when a user saves an image from a website, then
> does Command-I on it and can see what the URL was to that image
> originally?

I don't know.  Mac semantics are very different from UNIX.

> I LOVE that feature of MacOS (about the only thing I'd say I love)  :)
>
> I thought you had to use ls -ali (include the i that is) to see such
>info?

The i just gives you the inode number.  But all the other information
is stored in the inode.

>> the name is stored in a directory).  This is the only part of a file
>> which *must* exist.  An empty file doesn't have any data.
>
> Ya lost me.  Which part must exist?

The inode.  That's what defines the file.

>> Strictly speaking, the name isn't necessary unless you want to open
>> the file.  If it's already open, you can remove the name and still
>> access the file, but it will go away if you close it for the last
>> time.
>
> Doesn't what happens depend on what program is accessing the file?

No.

Greg
--
Finger grog@lemis.com for PGP public key
See complete headers for address and phone numbers

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020809013708.GC39322>