One liner that identifies all files on the current system that are writeable by the current user.
This version will find the files/directories writeable by the current user:
perl -MFile::Find -e 'find(sub {my $f = $File::Find::name; print $f, "
+\n" if -w $f && !-l $f}, "/")'
The following snippet will identify the files that are writeable for the given user - but only if the current user can access all of the directories that the specified user can see. If you can't see it, you can't check it. Note that this version will collect all of the files before printing anything.
use File::Find::Rule::Permissions;
my $user = @ARGV ? $ARGV[0] : $ENV{USER};
print $_,"\n" for File::Find::Rule::Permissions->file()
->permissions( user => $user, isWriteable => 1)
->in("/");