Wednesday, July 29, 2009

A few linux commands to


1. Suspend computer
echo -n mem > /sys/power/state

2. Hibernate computer
echo -n disk > /sys/power/state

3. Check if a file is empty
echo $(stat -c%s am_tired.sh) (where am_tired.sh is the file we are interested in)

0 comments: