date
是由您的操作系统提供的;它不是bash本身的一部分,并且它提供的选项根据您的操作系统而有所不同:由
man date
在确定哪些选项可用于
日期
你实际上已经安装了。
不过,您引用的命令是为之编写的——这些选项由GNU提供
;手册页副本可在
http://man7.org/linux/man-pages/man1/date.1.html
,部分内容如下:
-r, --reference=FILE
display the last modification time of FILE
-I[FMT], --iso-8601[=FMT]
output date/time in ISO 8601 format. FMT='date' for date only
(the default), 'hours', 'minutes', 'seconds', or 'ns' for date
and time to the indicated precision. Example:
2006-08-14T02:34:56-06:00
如果您想知道如何在非GNU系统上找到文件的修改时间,这是一个不同的问题
BashFAQ #87