Re: finding world-writable files - with find

"Sven Guckes [email protected] [sed-users]" <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
* [email protected] [2016-01-19 00:37]:
> I have a question on how to find world writable files.
> is there something else I can add to make
> sure all the world writable files are found?

* Sven Guckes <[email protected]>:
> i like the really short notation of the zsh:
> zsh> ls -l **/*(.W)

* [email protected] [2016-01-19 02:36]:
> thanks for responding...pretty cool -
> [but] I'm using bash not zsh though.
> apparently that won't work on my shell:
> bash: syntax error near unexpected toke

for bash set the option "globstar":
    $ shopt -s globstar
    $ ls -l **/*

see also:
    $ man bash
    /Pattern Matching

hmm.. not sure whether bash has any
globbing qualifiers like zsh, though.

not quite sure what your goal was.
but it was about removing the world-writable
permisison for all file under "/selinux"?

  zsh> chmod o-w $(ls /selinux/**/*(.W))

yes, the expanded list might be too long.
so using "find" for that is quite okay.

but why would you use "sed" here?
please describe your goal, too!

ps: please delete any unneccesarily
cited text before posting - thankyou.

Sven
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.