Disabling logout window in Gnome on ctrl-alt-delete (on Ubunu and Debian Linux for example)

It was quite annoying every time I hit ctrl-alt-del in Gnome, the Logout window appeared – instead giving the combination to the active window (virtual machines, VNC, Remote Desktop connections, etc.).

Gladly this is just another global shortcut like any other ones (alt-F1 for menu, for example), therefore it can be disabled the same way: System [...]

Posted in: Uncategorized by kakaopor No Comments

Getting file age in a simple way

I just needed a way to detect regularly if a file has been changed recently. The solution I came up with was this:

now=`date +%s`
mtime=`stat -c %Z /some/file`
if [ $((now - mtime)) -gt 3600 ]; then
    echo “xy seems to be out-of-date.”
fi

This checks the current time and the modification time of the file, calculates the difference and [...]

Posted in: Uncategorized by kakaopor No Comments
i
north-supercharged