The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] another OSX 100% less Unix
@ 2024-06-27  3:29 ron minnich
  2024-06-27  3:30 ` [TUHS] " ron minnich
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: ron minnich @ 2024-06-27  3:29 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]

I have a directory, t:
ronsexcllentmbp:t rminnich$ ls -li
total 0
23801442 -rw-r--r--  1 rminnich  wheel  0 Jun 26 20:21 a
23801443 -rw-r--r--  2 rminnich  wheel  0 Jun 26 20:21 b
23801443 -rw-r--r--  2 rminnich  wheel  0 Jun 26 20:21 c

note that b and c are the same inode.

let's make a cpio.

ronsexcllentmbp:t rminnich$ cpio -o >../t.cpio
a
b
c
^D
1 block

what's in it?
ronsexcllentmbp:t rminnich$ cpio -ivt < ../t.cpio
-rw-r--r--   1 rminnich wheel           0 Jun 26 20:21 a
-rw-r--r--   2 rminnich wheel           0 Jun 26 20:21 b
-rw-r--r--   2 rminnich wheel           0 Jun 26 20:21 c link to b

"c link to b"? wtf? Who thought that was a good idea? because ...
ronsexcllentmbp:t rminnich$ touch 'c link to b'
ronsexcllentmbp:t rminnich$ ls -l
total 0
-rw-r--r--  1 rminnich  wheel  0 Jun 26 20:21 a
-rw-r--r--  2 rminnich  wheel  0 Jun 26 20:21 b
-rw-r--r--  2 rminnich  wheel  0 Jun 26 20:21 c
-rw-r--r--  1 rminnich  wheel  0 Jun 26 20:22 c link to b

and
ronsexcllentmbp:t rminnich$ cpio -o >../t.cpio
a
b
c
c link to b
^D

ronsexcllentmbp:t rminnich$ cpio -ivt < ../t.cpio
-rw-r--r--   1 rminnich wheel           0 Jun 26 20:21 a
-rw-r--r--   2 rminnich wheel           0 Jun 26 20:21 b
-rw-r--r--   2 rminnich wheel           0 Jun 26 20:21 c link to b
-rw-r--r--   1 rminnich wheel           0 Jun 26 20:22 c link to b

so ... it looks like a file is there twice, because somebody thought it was
a good idea to confuse a file name and file metadata. And, anyway, it's
just as accurate to have it say
-rw-r--r--   1 rminnich wheel           0 Jun 26 20:21 a
-rw-r--r--   2 rminnich wheel           0 Jun 26 20:21 b link to c
-rw-r--r--   2 rminnich wheel           0 Jun 26 20:21 c link to b
-rw-r--r--   1 rminnich wheel           0 Jun 26 20:22 c link to b
Right? :-)

From the same people who brought you this:
ronsexcllentmbp:t rminnich$ bc
>>>

Somebody needs to get the osx folks a unix manual set :-)

[-- Attachment #2: Type: text/html, Size: 2525 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-06-27 22:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-27  3:29 [TUHS] another OSX 100% less Unix ron minnich
2024-06-27  3:30 ` [TUHS] " ron minnich
2024-06-27  9:47 ` Leah Neukirchen
2024-06-27 22:22   ` Bakul Shah via TUHS
2024-06-27 11:55 ` Peter Yardley
2024-06-27 12:06   ` Dan Cross
2024-06-27 13:54     ` Warner Losh
2024-06-27 19:08 ` Stuff Received
2024-06-27 19:44   ` segaloco via TUHS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).