0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

aureport -ts (--start) 日付指定は 「mm/dd/yy」正:yy 誤:yyyy 💢

Posted at

aureportでtodayとかじゃなく日付指定したくて --start mm/dd/yyyy を指定したら怒られた

$ aureport --auth --start "01/01/2023" -if /var/log/audit/audit.log
Error parsing start date (01/01/2023)

なんでー?かの国💢フォーマットで年をお尻にしてるじゃんっ⁉

年は 2桁 で指定するらしい

$ aureport --auth --start "01/01/23" -if /var/log/audit/audit.log
Authentication Report
============================================
# date time acct host term exe success event
============================================
1. 2023年...

OTL もう、なんなのよ、、、

-ts, --start [start-date] [start-time]
    Search for events with time stamps equal to or after the given end time. The format of end time  depends  on  your
    locale.  If  the date is omitted, today is assumed. If the time is omitted, midnight is assumed. Use 24 hour clock
    time rather than AM or PM to specify time. An example date using the en_US.utf8 locale is 09/03/2009.  An  example
    of time is 18:00:00. The date format accepted is influenced by the LC_TIME environmental variable.

manの09/03/2009とかLC_TIMEはミスリードなのでは。

環境依存なのかしら。bugレポートらしき情報は見つけたけど詳細調べる気にもならない徒労感。

$ aureport --version
aureport version 3.0.7
$ locale
LANG=ja_JP.UTF-8
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=

locale周りを理解出来ていない可能性...(それにしたって...)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?