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?
Finding all writable directories starting from the “/” directory and run a command on that directories with use a bash script
Something like this:
for i in `find / -type d 2>/dev/null` do [[ -w $i ]] && echo "+w: $i" done
Take look at the following