In article <slrng23nhl.15qa.g.kr
...@cerebus.local>,
Lewis <g.kr
...@gmail.com.dontsendmecopies> wrote:
> In message <uce-A363F6.07254206052
...@newsclstr03.news.prodigy.net>
> Gregory <u
...@splook.com> wrote:
> > In article <slrng1v9gb.15qa.g.kr
...@cerebus.local>,
> > Lewis <g.kr
...@gmail.com.dontsendmecopies> wrote:
> >> >> > ls doesn't show you the size of the resource fork.
> >> >> Sure it does.
> >> > No it doesn't.
> >> Yes it does.
> >> > Not unless told to explicitly
> >> See? You even agree it does.
> > No, I agree that it *can* if manipulated in a certain way
> So, ls shows the size of the resource fork if told to show it. That
> fits in with the rest of ls, which, for example, shows the size of the
> data fork *if told to show it*.
ls shows the size of the resource fork associated with a node if and
only if told to show information for a different (synthetic) node that's
not trivially detectable to a typical user. How many other behaviors of
ls are you aware of that are invoked by asking it for information about
a node other than the one in which you're interested?
Go up to a hundred people familiar with Unix-like systems, present them
with the scenario that a file system supports multiple distinct byte
streams for each directory entry but ls by default only shows the
information for the primary stream. Then ask them how they'd expect to
be able to get the information for the additional streams. Most of them
would expect a command-line switch in the vendor's ls implementation.
The rest would expect you're talking about extended attributes and look
for a solution that leverages their prior experiences in that realm. Not
one will start off with: "Well, I'd pretend the file I was interested in
was a directory and blindly type the path of a file with an arbitrarily
chosen name that resides inside that 'directory' hoping that it exists."
It's an idiom that doesn't exist in any other consumer system and is
barely mentioned in any Apple publication, but by your reckoning it's
well-documented and obvious.
> > Well-known in certain circles. Not obvious and not well-documented. Also
> > not historically stable
> Oh really? had many crashes of ls with resource forks? really?
I meant stable in the sense of consistent over time. Similar to the way
it's used in the phrase "stable sort." Anyone knowledgeable enough to
take part in this discussion would have recognized that. Be a grown-up,
admit you screwed up and let it go.
> >> > If you have a file with content in both forks, there is no *single*
> >> > invocation of ls that will give you the same number that the Get Info
> >> > window will.
> >> The same number? That's true, ...
> > And it's what I said. So happy day.
> No, you said that if it showed the resource fork size it "won't tell you
> the size of the data fork", which statement was, and is, incorrect. The
> only thing ls will not do is combine the size of the two forks into a
> single number.
What I said is *right*up*there*. A dozen lines away. See what it says?
No single invocation that will give you the same number. You haven't
actually demonstrated otherwise; you've just contradicted and provided a
non-general workaround for that reality. Bummer if there's ever a node
with more forks than data and resource, of course.
> >> $ ls -ls file file.html/rsrc
> > Oh, excellent. After all this you illustrate the *deprecated* notation.
> And Why would I type the extra '..namedfork/' characters if I didn't
> need to?
Because the method you showed is deprecated and if you were actually
trying to be helpful you'd show the *recommended* way rather than the
one that happens to work but might not for much longer and spews
warnings to the system.log every time it's used. I just found it amusing
that right after claiming that it was well documented and implying that
it was obvious you used a technique that isn't officially reliable.
Surely you can see the humor in that.
> let's sum up, shall we:
> >> >> > ls doesn't show you the size of the resource fork.
> that was wrong
Only if you don't mind having to ask for a different node in the file
system than the one in which you're actually interested. A node the
existence of which can only be posited by an educated guess.
G
--
"Harry?" Ron's voice was a mere whisper. "Do you smell something ... burning?"
- Harry Potter and the Odor of the Phoenix