⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 node103.html

📁 Linux系统管理员指南中文手册0.5.zip 中文的哦。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds --><HTML><HEAD><TITLE>Showing and setting time</TITLE><META NAME="description" CONTENT="Showing and setting time"><META NAME="keywords" CONTENT="sag"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><LINK REL=STYLESHEET HREF="sag.css"></HEAD><BODY LANG="EN" > <A NAME="tex2html1592" HREF="node104.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html1590" HREF="node100.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html1584" HREF="node102.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html1594" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html1595" HREF="node108.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR><B> Next:</B> <A NAME="tex2html1593" HREF="node104.html">When the clock is </A><B>Up:</B> <A NAME="tex2html1591" HREF="node100.html">Keeping Time</A><B> Previous:</B> <A NAME="tex2html1585" HREF="node102.html">The hardware and software </A><BR> <P><H1><A NAME="SECTION001130000000000000000">显示和设置时钟</A></H1><P>在Debian系统中,系统时区由符号连接<tt>/etc/localtime</tt><A NAME="2804">&#160;</A>决定。连接指向描述本地时区的时区数据文件。时区数据文件存在<tt>/usr/lib/zoneinfo</tt><A NAME="2806">&#160;</A>中。其他Linux distributions可能不同。<P>用户可以用设置TZ环境变量来改变他的私人时区。如果不设置,就假定是系统时区。TZ变量的语法在<em>tzset</em><A NAME="2808">&#160;</A>(3)man页中说明。<P><tt>date</tt><A NAME="2810">&#160;</A>命令显示当前日期和时间。<A NAME="tex2html46" HREF="footnode.html#2802"><IMG  ALIGN=BOTTOM ALT="gif" SRC="./foot_motif.gif"></A>例如:<BLOCKQUOTE> <TT><code>$</code> <i>date</i> <BR> <code>Sun Jul 14 21:53:41 EET DST 1996</code> <BR> <code>$</code></TT></BLOCKQUOTE>That time is Sunday, 14th of July, 1996, at about ten before ten at the evening, in the time zone called ``EET DST''(which might be East European Daylight Savings Time).<tt>date</tt><A NAME="2814">&#160;</A>也可用于显示通用时间:<BLOCKQUOTE> <TT><code>$</code> <i>date -u</i> <BR> <code>Sun Jul 14 18:53:42 UTC 1996</code> <BR> <code>$</code></TT></BLOCKQUOTE><tt>date</tt><A NAME="2816">&#160;</A>也可用于设置核心的软件始终:<BLOCKQUOTE> <TT><code>#</code> <i>date 07142157</i> <BR> <code>Sun Jul 14 21:57:00 EET DST 1996</code> <BR> <code>#</code> <i>date</i> <BR> <code>Sun Jul 14 21:57:02 EET DST 1996</code> <BR> <code>#</code></TT></BLOCKQUOTE>更详细的见<tt>date</tt><A NAME="2818">&#160;</A>man页--syntax is a bit arcane. 只有<tt>root</tt>能设置时间。虽然每个用户可以有自己的时区,但时钟对每个人都是一样的。<P><tt>date</tt><A NAME="2820">&#160;</A>只显示或设置软件时钟。<tt>clock</tt><A NAME="2822">&#160;</A>命令同步硬件和软件时钟。用于系统启动时读取硬件时钟和设置软件时钟。如果两个时钟都需要设置,则先用<tt>date</tt><A NAME="2824">&#160;</A>设置软件时钟,然后用<tt>clock -w</tt>设置硬件时钟。<P><tt>clock</tt><A NAME="2826">&#160;</A>的<tt>-u</tt>告诉它硬件时钟是通用时间。<em>必须</em>正确使用<tt>-u</tt>选项。否则计算机将困惑到底是什么时间。<P>时钟必须小心改变。Unix系统的许多部分要求时钟工作正常。例如,<tt>cron</tt><A NAME="2828">&#160;</A>守侯程序周期地运行命令。如果改变时钟,它可能迷惑它是否该运行命令。On one early Unix system, someone set the clock twenty years into the future, and <tt>cron</tt><A NAME="2830">&#160;</A> wanted to run all the periodic commands for twenty years all at once.现在版本的<tt>cron</tt><A NAME="2832">&#160;</A>可以正确处理,但仍然要小心。大的前后跳跃比小的更危险。<P><HR><A NAME="tex2html1592" HREF="node104.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html1590" HREF="node100.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html1584" HREF="node102.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html1594" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html1595" HREF="node108.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR><B> Next:</B> <A NAME="tex2html1593" HREF="node104.html">When the clock is </A><B>Up:</B> <A NAME="tex2html1591" HREF="node100.html">Keeping Time</A><B> Previous:</B> <A NAME="tex2html1585" HREF="node102.html">The hardware and software </A><P><ADDRESS><I>Lars Wirzenius <BR>Sun Jun 29 13:31:22 EEST 1997</I></ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -