ausearch에서 시간과 날짜를 지정하는 방법

ausearch에서 시간과 날짜를 지정하는 방법

ausearch시간에 따라 달릴 수 있습니다 .

sudo ausearch --start '16:48:07'

또는 날짜:

sudo ausearch --start '05/07/2019'

하지만 둘 다는 아닙니다.

> sudo ausearch --start '05/07/2019 16:48:07'
Invalid start time (05/07/2019 16:48:07). Hour, Minute, and Second are required.

매뉴얼 페이지에는 날짜나 시간 또는 둘 다를 지정할 수 있음이 명확하게 나와 있지만 둘 다 지정하는 예는 없습니다.

ausearch지정된 날짜와 시간에 어떻게 실행할 수 있나요 ?

답변1

날짜와 시간은 별도의 매개변수여야 합니다.

sudo ausearch --start 05/07/2019 '16:48:07'

내가 찾은온라인 예시, 그러나 좀 더 주의 깊은 독자라면 다음에서 알아차릴 수 있을 것입니다.매뉴얼 페이지:

       -ts, --start [start-date] [start-time]
              Search for events with time stamps equal to or after  the  given
              start  time. The format of start 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.

-ts, --start [start-date] [start-time]분명히 하나가 아닌 두 개의 선택적 매개변수가 있다는 점에 유의하십시오 .

관련 정보