can you fake *nix uptime?

c2h2 picture c2h2 · Feb 14, 2011 · Viewed 12.4k times · Source

Just curious, Can you fake an uptime, for instance increase it to 10 years?

I have tried changing system time, and it won't do this trick.

Answer

Joachim Sauer picture Joachim Sauer · Feb 14, 2011
alias uptime='echo " 11:07:17 up 10 BILLION YEARS!,  4 users,  load average: 0.38, 0.52, 0.41"'

If you want to get extra-fancy, you could take the actual uptime output and modify that.