From: Ann Barcomb Date: 15:42 on 05 Sep 2003 Subject: find verbosity I admit...this may not be find's fault. I just notice it with find, but it really annoys me. I want a simple way to reduce verbosity. Specifically, I don't want to hear messages about all the directories I don't have permission to access. I know I don't have permission to access them, so just ignore them and continue! It's pretty common for someone to not have access to every file...or are you only supposed to run the command as root to avoid missing the result hiding amid the error messages? Why can't it just ignore directories I don't have access to? Example output: hrm[1] /home/ann> find /tmp -name foo find: /tmp/1/fd: Permission denied find: /tmp/2/fd: Permission denied find: /tmp/3/fd: Permission denied /tmp/foo find: /tmp/4/fd: Permission denied find: /tmp/5/fd: Permission denied Ideal output: hrm[2] /home/ann> find /tmp -name foo /tmp/foo (If you want to defend find by giving me a solution to this problem, I actually welcome rationality in this instance.)
From: Chris Nandor Date: 16:43 on 05 Sep 2003 Subject: Re: find verbosity At 07:42 -0700 2003.09.05, Ann Barcomb wrote: >(If you want to defend find by giving me a solution to this problem, I >actually welcome rationality in this instance.) Add 2>/dev/null to the end (assuming a sane shell)?
From: Ann Barcomb Date: 16:56 on 05 Sep 2003 Subject: Re: find verbosity That isn't the syntax for redirecting stderr in my shell (been a while since I used that feature so I can't remember the syntax). Still, I can't imagine anyone ever cares about these errors, so they should be supressed by default, or with a simple flag, not lots of typing. > At 07:42 -0700 2003.09.05, Ann Barcomb wrote: > >(If you want to defend find by giving me a solution to this problem, I > >actually welcome rationality in this instance.) > > Add 2>/dev/null to the end (assuming a sane shell)? > > -- > Chris Nandor pudge@xxxxx.xxx http://pudge.net/ > Open Source Development Network pudge@xxxx.xxx http://osdn.com/ >
From: Chris Nandor Date: 17:10 on 05 Sep 2003 Subject: Re: find verbosity At 08:56 -0700 2003.09.05, Ann Barcomb wrote: >That isn't the syntax for redirecting stderr in my shell (been >a while since I used that feature so I can't remember the syntax). I smell a "hates shell" rant coming on! If you're using csh, redirecting STDERR is exceedingly hard.
From: peter (Peter da Silva) Date: 17:31 on 06 Sep 2003 Subject: Re: find verbosity > Still, I can't imagine anyone ever cares about these errors, so they > should be supressed by default, or with a simple flag, not lots of > typing. 2>/dev/null is a simple flag. More importantly, it works for EVERY command. And, yes, if I'm doing a find in my own directory, I definitely want to see those errors. Just stick this in ~/bin/find and have done with it: #!/bin/sh case ".$1" in .-v) shift; exec /bin/find ${1+"$@"};; *) exec /bin/find ${1+"$@"} 2>/dev/null;; esac
From: peter (Peter da Silva) Date: 18:15 on 05 Sep 2003 Subject: Re: find verbosity > amid the error messages? Why can't it just ignore directories I don't > have access to? sh$ find /tmp -name foo 2> /dev/null tmp/foo sh$ Yay! Works! This is the shell that find was meant for. csh% find /tmp -name foo >& /dev/null csh% Bastard BSD shell sucks dead goats. I use csh because I prefer a couple of csh' features: the !?foo?:3 style command line editing I like better than UP UP UP UP LEFT LEFT LEFT LEFT too far RIGHT ... cursor-key histories. And ~/this and ~whoever/that... But that's about it. Unfortunately there isn't a bourne shell that's JUST got the good parts of CSH without boatloads of evil feeping creatures. So... don't rant about find, rant about csh and about the bash/zsh/foosh bastard developers who don't see "small" as a feature.
Generated at 17:46 on 21 Sep 2006 by mariachi