Seems simple, but couldn't find any answer:
Is it possible to edit a file for the purpose of updating the Linux date instead of using
date +%y%m%d -s "DATE" command?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
There's no file representing the current system time on Linux. Linux gets the current time from the RTCs (real-time clocks) or from external sources like NTP servers, and then keeps track of it internally. The file-like representations of the RTC (
/dev/rtc*) are used for configuring and recieving alarms, and can't be used for setting the time. The RTC status file (
/proc/driver/rtc) is read-only. See the kernel documentation for details.