| Newsgroups |
gmane.editors.sed.user |
| Message-ID |
<[email protected]> |
Not clear what you are trying to do. If you would more clearly explain
your goal, with an example someone could replicate, it would help.
You say "I'm not completely getting all of the world writible system
files". Well, what are you getting? Again, an example would help.
sed -i '/pattern/d' /etc/rc.local is going to delete matching lines from
/etc/rc.local file. Is that really what you want? I don't think so. In
any case, it's not going to delete any lines, because the pattern is not
going to match.
I would suggest one runs "find" to find world-writable files. sed is
very powerful and useful, but I don't see what it has to do with this
particular exercise. Maybe I'm missing something?
Daniel
======================================= original post
I have a question on how to find world writable files.
sed -i '/find \/selinux -type f -perm +0002 -exec chmod o-w {} \\;/d'
/etc/rc.local
sed -i '/find \/ -perm -2 -a \\( -type d -o -type f \\) -exec ls -ld {}
\\;/d' /etc/rc.local
is there something else I can add to make sure all the world writable
files are found?