ทิป เทคนิค สำหรับผู้ดูแลระบบ > ทิป เทคนิค สำหรับผู้ดูแลระบบ(Administrator)

คำสั่งตั้งเวลาให้กับเซิร์ฟเวอร์ To set the date/time Linux และ Unix

(1/1)

ครูสุรพล กิ่มเกลี้ยง:
[PZ06] [PZ06] [PZ06]

คำสั่งตั้งเวลาให้กับเซิร์ฟเวอร์ To set the date/time Linux และ Unix

ใช้คำสั่งเพื่อตรวจสอบว่า วันเวลาของเครื่องเซิร์ฟเวอร์ของเราถูกต้องหรือไม่

This is the quick and dirty solution...

To display the current date/time

$ date << คำสั่งตรวจสอบ

To set the date/time

$ sudo date MMDDhhmmYYYY << รูปแบบคำสั่งจำลอง

Example:

$ sudo date 021520302009 << ตัวอย่างคำสั่งที่ใช้งานจริง

โดยเรียงตามลำดับตัวเลขจากด้านหน้า ประกอบด้วย

02 << เดือน ก.พ.
15 << วันที่ 15
20 << เวลา (20 นาฬิกา)
30 << นาที (30 นาที)
2009 << ปี 2009

(that is the time of my posting)

MM - Two digit month number << เดือน
DD - Two digit date << วัน
hh - Two digit 24 hour system hour << ชั่วโมง
mm - Two digit minute << นาที
YYYY - Four digit year code << ปี

ข้อมูลเพิ่มเติม http://www.forum.psoft.net/archive/index.php/t-13307.html

FrankJScott:
Please try Google before asking about Awesome Product Website 8_595dd

นำร่อง

[0] ดัชนีข้อความ

Go to full version