gphoto2
经常会在其错误消息中添加一个建议节,这在第一时间是有用的,但此后只会妨碍:
For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-devel@lists.sourceforge.net>, please run
gphoto2 as follows:
env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --port
usb:002,035 -L A/store_00010001/DCIM/
Please make sure there is sufficient quoting around the arguments.
这样可以在没有蛮力的情况下被抑制吗?
将gphoto2
包裹在/usr/local/bin/gphoto2
内,过滤其输出。
从源代码编译,并注释掉该部分。
gphoto2 --quiet
,过多地抑制。
答案 0 :(得分:0)
一位朋友挖掘了源代码。他找到了 错误转到stderr,建议stdout;
会抑制建议(但不是错误)gphoto2 ... > /dev/null
此外,--debug
会抑制建议,因此另一个答案是
gphoto2 ... --debug --debug-logfile=/dev/null
对于日常使用,请在您使用的任何外壳中使用其中一个别名。