On Sat, Feb 01, 2020 at 01:38:55PM -0500, songbird wrote: > Reco wrote: > > On Sat, Feb 01, 2020 at 12:36:28PM -0500, songbird wrote: > >> the directory is a mount point of a device in limbo. > >> it is showing up as mounted but it really isn't (the > >> device is turned off). > > ... > >> > >> i just want the answer to be 0 or the number of files. > > > > Fuse does not work that way. If a userspace backend cannot perform its > > function (in this case - a device is disconnected) - it's free to return > > all kinds of error even on a simple opendir(3). > > > > Best you can do is to execute: > > > > fusermount -u /home/me/pics/camera > > i don't care if it is returned, i just wonder why it isn't > redirected to /dev/null like i'm asking it to do.
Because you're redirecting stderr of a wrong process. This one-liner should do it. find . -type f -exec printf %.0s. {} + 2>/dev/null | wc -m Reco