How to check if power cable is connected from the command line?
Posted
by D Connors
on Super User
See other posts from Super User
or by D Connors
Published on 2010-06-09T22:48:46Z
Indexed on
2010/06/10
18:24 UTC
Read the original article
Hit count: 192
Hi, 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.
© Super User or respective owner