4 ms·
Re: cat cat is just passing along the error string from the libc/system call it used. That error string is standard-ish over most libcs; some unixs can read di
by mcguire 6y ago
Re: cat
cat is just passing along the error string from the libc/system call it used. That error string is standard-ish over most libcs; some unixs can read directories as if they were files.
Changing that message would require significant additional complexity in cat which probably isn't useful.
- ufo 6y agoExactly. "No such file or directory" is the default error message for the ENOENT error code. https://www.man7.org/linux/man-pages/man3/errno.3.html https://www.man7.org/linux/man-pages/man3/errno.3.html