Find should not record and exit with an error status on cyclic directories (bind mounted)
Issue
- /usr/bin/find directories with
.snapshotreturn exit code 1 (echo $? = 1) on RHEL 6.4 servers. the same command on RHEL 5.x works fine. - Example of warning message from both 6.4 and 5.x servers:
find: File system loop detected; `/gfs/amm/data_log/.snapshot' is part of the same file system loop as `/gfs/amm/data_log'.
OR
$ mkdir -p a/b
> $ sudo mount --bind a a/b
> $ find a; echo $?
> a
> find: File system loop detected; ‘a/b’ is part of the same file system loop as ‘a’.
> 1 <========================== it should be 0
Environment
- Red Hat Enterprise Linux 6
- findutils-4.4.2-6.el6.x86_64
- findutils-4.2.27-6.el5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.