2,187
edits
m (→System: Added nice) |
(→Commands: Added "NTP / Date and Time") |
||
Line 80: | Line 80: | ||
|- | |- | ||
|<code> tail <file> </code> || Displays the last 10 lines of a file, <code>-f</code> follows any updates (eg to monitor a log file) | |<code> tail <file> </code> || Displays the last 10 lines of a file, <code>-f</code> follows any updates (eg to monitor a log file) | ||
|} | |||
=== NTP / Date and Time === | |||
{|class="vwikitable" | |||
|- | |||
! Syntax !! Action / Description | |||
|- | |||
|<code> date </code> || Show the local system date and time | |||
|- | |||
|<code> date -d <string> </code> || Show/calculate the date and time represented by <code><string></code> (eg 'tomorrow', 'next week', 'thursday') | |||
|- | |||
|<code> ntpdate -p 1 -q -d ntp.domain.com </code> || Test/query an NTP server (replace <code>ntp.domain.com</code>) | |||
|- | |||
|<code> ntpdate -d ntp.domain.com </code> || Set system clock from an NTP server (replace <code>ntp.domain.com</code>) | |||
|} | |} | ||