I want to create a bash script, this script should find all the directories that are writable by the user running the script starting from the “/” directory and run any command on those directories. Can anyone write a bash script example like this?
Something like this:
for i in `find / -type d 2>/dev/null`
do
[[ -w $i ]] && echo "+w: $i"
done