Home » Questions » Computers [ Ask a new question ]

how to get rid of warnings from using find

how to get rid of warnings from using find

I got lots of warnings when I search a certain file under a directory with lots of dangling links. I tried to use the -nowarn option to get rid of the warnings but in vain. The warnings I get look like:

Asked by: Guest | Views: 276
Total answers/comments: 1
bert [Entry]

"You could redirect stderr to /dev/null like these examples:

find . -type f 2> /dev/null
find . -type f -print0 2> /dev/null | xargs -0 ls -l

though the concern here would be that you are ignoring all errors reported on stderr by find, so removing the dangling symlinks if they are not needed (they might be required if they refer to filesystems that are not mounted right now but will be later, for instance, but if there is not reason for them to be present then get rid of them rather than trying to hide warnings about them) would be the first choice of solution."