[TUHS] another OSX 100% less Unix

ron minnich rminnich at gmail.com
Thu Jun 27 13:30:51 AEST 2024


and, yes, on linux, it behaves more properly
rminnich at pop-os:/tmp/t$ cpio -ivt < ../t.cpio
-rw-rw-r--   1 rminnich rminnich        0 Jun 26 20:29 a
-rw-rw-r--   2 rminnich rminnich        0 Jun 26 20:29 b
-rw-rw-r--   2 rminnich rminnich        0 Jun 26 20:29 c
1 block



On Wed, Jun 26, 2024 at 8:29 PM ron minnich <rminnich at gmail.com> wrote:

> 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 :-)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.tuhs.org/pipermail/tuhs/attachments/20240626/a721c8c5/attachment-0001.htm>


More information about the TUHS mailing list