[英]How to zip files using last modified date and time using shell command in linux
[英]Linux: How to display the date in a different time format using the last command in terminal?
我正在尝试仅显示用户的上次登录时间。
目的是像显示时间一样
date "+d% %B%t%Y"
将。
我试过了:
last -n1 --time-format "+d% %B%t%Y"
但它一直告诉我这是未知的时间格式。 我还在上一个示例中尝试了这些格式,但这些格式似乎都不起作用。 还有另一种方法吗?
--time-format
选项仅接受以下选项:
--time-format <format> show timestamps in the specified <format>:
notime|short|full|iso
您可能需要自己解析日期时间,例如从ISO格式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.