I want to perform checks on all files in the system. For that I need the full paths of all files in the system. My initial idea was to do something like this:
for file in $(sudo find / ); do if [ -d $file ]; then and so on.
But then I read that it's bad practice to process the output of find that way. What then is the correct way?
(I tried things like ls -RF | grep "/$". That, however, only gives me the directory names but I need the full path of every file, directory etc. in the system.)