[英]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.