Question

On an embedded Linux device that does not present /dev/rtc*, how can I set off a console window writing the value of the Real-Time Clock to the console, on the tick, every time it changes?

Results would be like:

$ **someCmd**
Mon Mar 14 16:43:22 UTC 2011
Mon Mar 14 16:43:23 UTC 2011
Mon Mar 14 16:43:24 UTC 2011
Mon Mar 14 16:43:25 UTC 2011
Mon Mar 14 16:43:26 UTC 2011

etc.

The device is armv5tejl running BusyBox v1.13.3.

Was it helpful?

Solution

I don't know how much the BusyBox shell supports, but in sh you could do something like this:

{ while true ; do date ; sleep 0.1 ; done } | uniq

OTHER TIPS

Use the watch commad, try this is: watch -n 1 date

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top