我正在寻找这个文件:/sys/class/backlight/intel_backlight/brightness 所以我尝试使用这个 cmd 来搜索它:
sudo find /sys -name "brightness"
但它找不到。我可以进入文件夹并运行它,但它仍然找不到它。它找到了一大堆亮度文件,但没有找到 /sys/class/backlight/intel_backlight 中的那个。
unkn0wn@archie{~}:sudo find /sys -name "brightness"
/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/brightness
/sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/leds/phy0-led/brightness
/sys/devices/platform/i8042/serio0/input/input0/input0::capslock/brightness
/sys/devices/platform/i8042/serio0/input/input0/input0::scrolllock/brightness
/sys/devices/platform/i8042/serio0/input/input0/input0::numlock/brightness
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinkvantage/brightness
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinklight/brightness
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::standby/brightness
/sys/devices/platform/thinkpad_acpi/leds/tpacpi::power/brightness
为什么?
答案1
从man find
:
-P Never follow symbolic links. This is the default behavior. ...
-L Follow symbolic links.
/sys/class/backlight/intel_backlight
是符号链接,因此不会被跟踪。正如 Zoredache 在评论中指出的那样,实际文件位于其物理路径中。
请注意,您最好使用find
此处的默认行为,因为尝试sudo find -L /sys -name "brightness"
读取会导致无限错误File system loop detected
。