Subject: "rm -rf *" performs an extra skip when it encounters an immutable empty directory

From: Nishant Nayan <[email-masked]>
Date: Thu, 26 Nov 2020 16:01:15 +0530

Hi,

The 'rm' utility' is skipping a mutable file when it encounters an 
immutable empty
directory (while deleting group of files and directories). 
Version(/8.22-18.0.1)/

Description: The bug is that rm skips an extra file while it encounters
an immutable empty directory. For example, on doing an "rm -rf *" on "a 
b c foo x y z",
where a,b,c,x,y,z are mutable files and foo is an immutable empty 
directory, the output
was "foo x", as soon as rm encounters an immutable directory, it skips 
it's immediate
next file(x in this case) and deletes all other files.

I would like to know if it's a known bug?

Regards
Nishant Nayan