Archive for October, 2011


Set date and time of a Linux device from a Windows batchfile

I had a client with Linux device that whose clock is not as reliable as it should be, running a time-critical application.

As a workaround fix I wrote a Windows batchfile to update the Linux date and time, and  he has set up a windows scheduled task to run it every morning:

set Day=%date:~0,2%
set Month=%date:~3,2%
set Year=%date:~6,4%

set Hour=%time:~0,2%
set Minute=%time:~3,2%
set Second=%time:~6,2%

@C:\path_to_plink\plink.exe -ssh -pw linux_password linux_user@ date %Month%%Day%%Hour%%Minute%%Year%.%Second%

Once again I have utilised one of the free PuTTY tools (plink.exe):


Force a favicon onto a webpage

<link rel="shortcut icon" href="" type="image/x-icon" />

This will force a favicon onto your webpage – useful if you house different websites in subfolders – each subfolder site (or page for that matter) can have a different favicon.

Tags: ,