On Fri, 2020/07/10 09:38:48AM -0400, Giles Orr via talk <talk@gtalug.org> wrote:
| This gives immediate visual feedback on the write-status of the
| current directory.  But test's '-w' and '-d' both claim that you're
| still in a valid directory under the above circumstances.  Does anyone
| know of a simple way to find out if the directory you're currently in
| actually exists?

The directory "." will still exist while you have it open (your current
directory), but will be unreachable, as you observed with stat(1) and
the number of links.

Would checking for "test -d $PWD" work?  I think $PWD is the full path
and so if it's no longer reachable, the test should fail?

Hope that helps

John
---
Post to this mailing list talk@gtalug.org
Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk

Reply via email to