0

I have a small text file (some metadata redacted)

-rw-r--r--  1 ****  ****  17198 Sep 29  2019 230999.txt

But it can't be viewed

% cat 230999.txt
cat: 230999.txt: Attribute not found

I'm not sure what attribute is missing. It's a simple text file. cp and mv return the same error.

Stat shows st_blocks and st_size values that don't seem consistent:

% stat -f 'st_size=%z st_blocks=%b st_blksize=%k' 230999.txt
st_size=17198 st_blocks=0 st_blksize=4096

Everything I've read relates st_size and st_blocks usually using st_blksize. This tells me the file size but says there are no blocks allocated to it.

How do I access this file?

Update in response to comment:

I am unfamiliar with strace so I did the following:

sudo dtruss cat 230999.txt
...
open("230999.txt\0", 0x0, 0xFFFFFFFFE4CFABE5)        = -1 Err#2
write_nocancel(0x2, "cat: \004\b\0", 0x5)        = 5 0
write_nocancel(0x2, "230999.txt\b\0", 0xA)       = 10 0
write_nocancel(0x2, ": \b\0", 0x2)       = 2 0
write_nocancel(0x2, "No such file or directory\n\b\0", 0x1A)         = 26 0
close_nocancel(0x1)

(Left as an update since comments destroyed formatting)

John D.
  • 101
  • 2

0 Answers0