Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
How can i change the uptime in Red Hat 9.0 ?
My machine is on 12 days up and i wanna to change it for more time, something like 50 or more ..
If someone know how can i change it just to type it here... thanx~
You can't that I know of, its basically pulling this information from your system and when it booted for the first time. Unless you can trick your computer into thinking it booted 50 days ago instead of 12, I really don't see the point in you trying to do this. Why not just let it keep running without a reboot, you'll get there in 38 more days...
Call:
cat /proc/uptime
If you see some numbers, feel free to manipulate them, you might be able to echo something:
echo 10000 > /proc/uptime
And and see if that up's the uptime
Nope, it didn't work for me See about adjusting your system clock, maybe that'll bump that uptime to the figures you are looking for. Or, if you'd like you can point them towards my box, currently running a 72/73 day uptime ( www.masterc.no-ip.org/forums at the bottom of the page ) and just tell em it's yours
How about an alias? Remove the execute bit on your uptime call:
chmod a-x /usr/bin/uptime
And then create yourself a script or alias to call a complete fake uptime?
Code:
#!/bin/bash
date
echo up 88 days, 1 user, load average: 0.09, 0.16, 0.07
Save that as uptime in /usr/local/bin (the different directory than the real uptime is in). Make it executable:
chmod 755 /usr/local/bin/uptime
And then execute it:
uptime
And see if it works.
Alternatively, an alias:
Open up your ~/.bashrc And add an alias:
alias uptime='date && echo up 88 days, 1 user, load average: 0.09, 0.16, 0.07'
Save and exit, then source it:
. .bashrc
And then type:
uptime (after removing the execute bit from the real uptime app of course) and see if that works
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.