您可以编写一个C程序并检查
ESTALE。
#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#include <iso646.h>#include <errno.h>#include <stdio.h>#include <stdlib.h>int main(){ struct stat st; int ret; ret = stat("/mnt/some_stale", &st); if(ret == -1 and errno == ESTALE){ printf("/mnt/some_stale is stalen"); return EXIT_SUCCESS; } else { return EXIT_FAILURE; }}


