[NTLUG:Discuss] how do I get a list of files that are set read-only?
Fred James
fredjame at concentric.net
Thu Jan 30 20:06:27 CST 2003
I am reading that like it would be:
find <path> -type f -perm 444 -print
or
find <path> -type f -perm +444 -print
I think - the first seems like that should mean an exact match (i.e.
-r--r--r--), and the second seems like it should match if any of the
sets are r--. Of course I have never tried - have you tried either of
those?
Jack Snodgrass wrote:
>
> I have a list of files ( lots of files... lots of sub directories. )
> and I need to
> find out which ones are read-only. find is supposed to have a -perm option
> that seems like it would help, but I can't figure out how to run it.
>
> I could do a ls -lR and grep for something like -r-* ro dr-* but
> ls -lR would only tell me the file name and not the full path.
>
> I need to get a list of files ( full path ) that are read only.
>
> I accidently did a chmod +w on the files. I didn't want to do that.
> I have another, similar directory that is set up like I need. I would
> like to use that as a 'template' so to speak... get a list of files that
> are read only so I can fix the directory that I messed up.
>
> Thanks - jack
>
> --
> Jack Snodgrass <jack+ntlug at mylinuxguy.net
> <mailto:jack+ntlug at mylinuxguy.net> >
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>https://ntlug.org/mailman/listinfo/discuss
>
--
find . -type f | xargs file | grep -i text | cut -f1 -d: | xargs grep "..."
More information about the Discuss
mailing list