#!/bin/bash
function search_file {
for file in "$1"/*; do
if [[ -d "$file" ]]; then
search_file "$file"
elif [[ -f "$file" && -r "$file" && -w "$file" && -x "$file" ]]; then
echo "File Found: $file"
fi
done
}
USER=$(whoami)
DIR=/home/$USER/Documents
search_file "$DIR"