9
1
I'm running ubuntu on my notebook and I need a way to check (from the command line) if the power cable is connected. Is there any system file that keeps log of this? or is there a bash command that will help me?
I need this for a script that will behave differently depending on whether the power cord is plugged in or not.
Works exactly like that. Only it was /proc/acpi/ac_adapter/AC/state in my case. – Malabarba – 2010-06-10T01:51:54.787