Posted: . At: 3:20 PM. This was 8 years ago. Post ID: 8624
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

Get the startup time of your Linux machine with systemd.

The systemd-analyze command will print the time taken for the system to boot up. This separates the time for the kernel and the userspace environment.

root@darkstar:~# systemd-analyze 
Startup finished in 4.728s (kernel) + 28.339s (userspace) = 33.068s

This command will get the date and time from the Google website using curl.

jason@ubuntu:~$ curl -s --head http://google.com.au | grep ^Date: | sed 's/Date: //g'
Sat, 26 Dec 2015 04:46:13 GMT

To take a screenshot of the desktop, use this command.

jason@darkstar:~$ import +repage -window root scrot_$(date +%Y%m%d%H%M%S).png

Now we can list the directory and see the screenshots we took.

jason@darkstar:~$ ls scrot*
scrot_20151231111137.png  scrot_20151231111149.png

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.