Find all immutable files & folders in web folder?

how can I find (lsattr) which files or folders have an immutable status?
e.g. check all files and folders in /var/www

man lsattr:

OPTIONS
       -R     Recursively list attributes of directories and their contents.

       -V     Display the program version.

       -a     List all files in directories, including files that start with `.'.

       -d     List directories like other files, rather  than  listing  their  con‐
              tents.

       -l     Print the options using long names instead of single character abbre‐
              viations.

       -p     List the file's project number.

       -v     List the file's version/generation number.

-R might be useful.

2 Likes

I suspect jonathon’s hint has already helped you out, but just in case …

lsattr -Rl /var/www 2>&1 | grep Immutable | cut -d' ' -f1

1 Like