热门关键字:  ubuntu  分区  Fedora  linux系统进程  函数

当前位置 :| 主页>Linux教程>Linux命令>

date Linux and Unix 命令手册

来源: 作者: 时间:2007-11-24 Tag: 点击:

EXAMPLES

     Example 1: Generating output

 

     The command

 

     example% date '+DATE: %m/%d/%y%nTIME:%H:%M:%S'

     generates as output

 

     DATE: 08/01/76

 

     TIME: 14:45:05

 

     Example 2: Setting the current time

 

     The command

 

     example# date 1234.56

 

     sets the current time to 12:34:56.

 

ENVIRONMENT VARIABLES

     See environ(5) for descriptions of the following environment

     variables  that  affect  the  execution  of  date: LC_CTYPE,

     LC_TIME,  LC_MESSAGES,  and NLSPATH.

 

     TZ    Determine the timezone in which the time and date  are

           written, unless the -u option is specified.  If the TZ

           variable is not set and the -u is not  specified,  the

           system default timezone is used.

 

EXIT STATUS

     The following exit values are returned:

 

     0     Successful completion.

 

     >0    An error occurred.

 

ATTRIBUTES

     See attributes(5) for descriptions of the  following  attri-

     butes:

 

  /usr/bin/date

 

SunOS 5.8           Last change: 20 Apr 1999                    3

 

User Commands                                             date(1)

 

     ____________________________________________________________

    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |

    |_____________________________|_____________________________|

    | Availability                | SUNWcsu                     |

    |_____________________________|_____________________________|

    | CSI                         | enabled                     |

    |_____________________________|_____________________________|

 

  /usr/xpg4/bin/date

     ____________________________________________________________

    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |

    |_____________________________|_____________________________|

    | Availability                | SUNWxcu4                    |

    |_____________________________|_____________________________|

    | CSI                         | enabled                     |

    |_____________________________|_____________________________|

 

SEE ALSO

     strftime(3C), attributes(5), environ(5), XPG4(5)

 

DIAGNOSTICS

     no permission

           You are not the super-user and you tried to change the

           date.

 

     bad conversion

           The date set is syntactically incorrect.

 

NOTES

     If you attempt to set the current date to one of  the  dates

     that the standard and alternate time zones change (for exam-

     ple, the date that daylight time is starting or ending), and

     you  attempt  to  set  the  time  to  a time in the interval

     between the end of standard time and the  beginning  of  the

     alternate  time  (or  the  end of the alternate time and the

     beginning of standard time), the results are unpredictable.

 

     Using the date command from within windowing environments to

     change  the  date  can  lead to unpredictable results and is

     unsafe. It may also be unsafe in the multi-user  mode,  that

     is,  outside  of  a windowing system, if the date is changed

     rapidly back and forth. The recommended method  of  changing

     the date is 'date -a'.

 

SunOS 5.8           Last change: 20 Apr 1999                    4

 

bash-2.03#




相关文章:
unix与linux中的inode
高级 Linux 命令精通指南
Linux命令集合
Linux补丁工具 diff + patch
section.1 start
tar命令详解
Linux - chattr & lsattr
ln 命令的使用
Linux关机命令学习
Linux - chown 中的 -R 参数
linux - umask
linux初级使用命令
sed 命令
cp 命令
Linux必学的60个命令(1)-安装与登陆
Linux必学的60个命令(2)-文件处理
APT-CDROM
[Unix通用命令]与用户相关的命令
[Unixt通用命令]定位命令
dircolors
declare
rmmod
passwd
linux的kill命令与信号控制
怎么样把man手册的内容保存到某个文件里面?
linux 逐级显示文件命令--tree
Linux grep命令的使用
7个极具危险性的Linux命令
tr命令使用方法
apt-move 制作本地源