* * * * *
When a file doesn't exist, yet it's right there
For reasons, I'm downloading a file from several hundred different domains.
The results start trickling in and I decide to take a look at one of them:
-----[ shell ]-----
[spc]lucy:/tmp/cache>ls 04d.co
04d.co
[spc]lucy:/tmp/cache>more 04d.co
Error: File or directory not found!
[spc]lucy:/tmp/cache>
-----[ END OF LINE ]-----
Um … what?
Okay. There could be an invisible character or two in the filename.
-----[ shell ]-----
[spc]lucy:/tmp/cache>echo * | hex | more
00000000: 30 34 64 2E 63 6F 20 31 34 33 36 2E 6E 69 6E 6A 04d.co 1436.ninj
..
[spc]lucy:/tmp/cache>
-----[ END OF LINE ]-----
Nope. But what could cause the shell not to find the file when the file is
right there! The name shouldn't matter. But I can't view it.
-----[ shell ]-----
[spc]lucy:/tmp/cache>cat 04d.co
Error: File or directory not found!
[spc]lucy:/tmp/cache>
-----[ END OF LINE ]-----
Okay, what if I try to move it somewhere?
-----[ shell ]-----
[spc]lucy:~/tmp>cp /tmp/cache/04d.co .
[spc]lucy:~/tmp>more 04d.co
Error: File or directory not found!
[spc]lucy:~/tmp>
-----[ END OF LINE ]-----
I can list the file:
-----[ shell ]-----
[spc]lucy:~/tmp>ls -l 04d.co
-rw-r--r-- 1 spc spc 37 Jun 17 22:25 04d.co
[spc]lucy:~/tmp>
-----[ END OF LINE ]-----
Let me try one last thing …
-----[ shell ]-----
[spc]lucy:~/tmp>hex 04d.co
00000000: 45 72 72 6F 72 3A 20 46 69 6C 65 20 6F 72 20 64 Error: File or d
00000010: 69 72 65 63 74 6F 72 79 20 6E 6F 74 20 66 6F 75 irectory not fou
00000020: 6E 64 21 0D 0A nd!..
-----[ END OF LINE ]-----
I was downloading these files from the Intenet. This particular site didn't
have the file. The contents of the file is the error message.
Head. Meet desk.
This reminds me of college. Back then, the command finger [1] was popular,
and when using it, the program would attempt to locate a file called .plan in
the home directory and display it. I made a joke .plan file that read:
-----[ data ]-----
Bus error - core dumped
You have new mail.
-----[ END OF LINE ]-----
I can't count the number of times someone tried to finger me, only to attempt
to remove a non-existent core file and impulsively check their email.
[1]
https://en.wikipedia.org/wiki/Finger_(protocol)
Email author at
[email protected]