Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Date format from Jan 01 2015 11:00:00 PM to 01/01/2015 23.00.00 Post 302943597 by Don Cragun on Monday 11th of May 2015 03:29:06 AM
Old 05-11-2015
Is this a homework assignment?

What have you tried to solve this problem?

Do these date and time stamps appear on lines by themselves? Or at the start of lines? Or at a fixed location other than the start of a line? If not, how can the date and time stamps be uniquely identified as distinct from other text that might appear in your data?

Is this data contained in a text file? What is the format of data in your input file other than the date and time strings?

Is this a stand-alone project, or is other processing going to be done to your data at the same time? If other processing is being done, what tools are being used to do the other processing?

Your sample data and the format you showed us for your sample data is inconsistent. Is there one space between the day and the year as shown in:
Code:
Mon DD YYYY hh:mi:ss AM/PM

Or are there two spaces as shown in:
Code:
Jan 01  2015 11:00:00 PM

?
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl one-liner to get yesterday's date in format dd-MMM-yy (i.e. 01-JAN-12)

I have the following perl one-liner to get yesterday's date, but I would like it in the form of dd-MMM-yy (for example: 01-JAN-12). Can someone alter the below code so I get the format I want? Also, could someone also give me a line for dd-Mmm-yy (for example 01-Jan-12)? Code: YEST=`perl -w... (3 Replies)
Discussion started by: thibodc
3 Replies

2. Shell Programming and Scripting

How to convert date format such as 7/18/2015 to the number of month

How to convert date format such as 7/18/2015 to the number of month from requesting date 'date' in sh scripting ? Let say I have output in my log.txt -> 7/18/2015. How I convert it to the full number of month starting from 'date' till 7/18/2015 in shell scripting ? Thanks in advance. (1 Reply)
Discussion started by: amerabest
1 Replies

3. What is on Your Mind?

While Happy; do @ ;done < 2015

http://i62.tinypic.com/zt6a08.jpg (2 Replies)
Discussion started by: ongoto
2 Replies

4. Solaris

Leap second for year 2015

I hear the Leap second for 2015 will occur on June 30 at 23:59:60 according to the wild rumours from internet the expected impact ranges from crashing to hanging servers. Can anybody share their preparations what they have done for solaris servers? are there any patches to install or workaround?... (1 Reply)
Discussion started by: sparcguy
1 Replies

5. What is on Your Mind?

LinuxCon Seattle 2015

Only a little over a week until I head out to LinuxCon in Seattle. Anyone else attending this year? (0 Replies)
Discussion started by: Gallavin
0 Replies

6. SCO

Strange behaviour on Openserver 5.0.2 after 09/2015

Dear friends, i am having some Problems with a Sco Openserver in a Box (normally on VMWare, importing it on a Virtualbox does the same). When i boot up the system on xx/09/2015 i got fork failed - too many processes during startup. The programs which should run on the server, do not run. I... (67 Replies)
Discussion started by: ChipperEs
67 Replies
AUREPORT:(8)						  System Administration Utilities					      AUREPORT:(8)

NAME
aureport - a tool that produces summary reports of audit daemon logs SYNOPSIS
aureport [options] DESCRIPTION
aureport is a tool that produces summary reports of the audit system logs. The aureport utility can also take input from stdin as long as the input is the raw log data. The reports have a column label at the top to help with interpretation of the various fields. Except for the main summary report, all reports have the audit event number. You can subsequently lookup the full event with ausearch -a event number. You may need to specify start & stop times if you get multiple hits. The reports produced by aureport can be used as building blocks for more complicated analysis. OPTIONS
-au, --auth Report about authentication attempts -a, --avc Report about avc messages -c, --config Report about config changes -cr, --crypto Report about crypto events -e, --event Report about events -f, --file Report about files --failed Only select failed events for processing in the reports. The default is both success and failed events. -h, --host Report about hosts -i, --interpret Interpret numeric entities into text. For example, uid is converted to account name. The conversion is done using the current resources of the machine where the search is being run. If you have renamed the accounts, or don't have the same accounts on your machine, you could get misleading results. -if, --input file Use the given file instead if the logs. This is to aid analysis where the logs have been moved to another machine or only part of a log was saved. --input-logs Use the log file location from auditd.conf as input for analysis. This is needed if you are using aureport from a cron job. -k, --key Report about audit rule keys -l, --login Report about logins -m, --mods Report about account modifications -ma, --mac Report about Mandatory Access Control (MAC) events --node node-name Only select events originating from node name string for processing in the reports. The default is to include all nodes. Multiple nodes are allowed. -p, --pid Report about processes -r, --response Report about responses to anomaly events -s, --syscall Report about syscalls --success Only select successful events for processing in the reports. The default is both success and failed events. --summary Run the summary report that gives a total of the elements of the main report. Not all reports have a summary. -t, --log This option will output a report of the start and end times for each log. --tty Report about tty keystrokes -te, --end [end-date] [end-time] Search for events with time stamps equal to or before 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, now 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. You may also use the word: now, recent, today, yesterday, this-week, week-ago, this-month, this-year. Today means starting now. Recent is 10 minutes ago. Yesterday is 1 second after midnight the previous day. This-week means starting 1 second after midnight on day 0 of the week determined by your locale (see localtime). This-month means 1 second after midnight on day 1 of the month. This-year means the 1 second after midnight on the first day of the first month. -tm, --terminal Report about terminals -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 influ- enced by the LC_TIME environmental variable. You may also use the word: now, recent, today, yesterday, this-week, this-month, this-year. Today means starting at 1 second after midnight. Recent is 10 minutes ago. Yesterday is 1 second after midnight the previous day. This-week means starting 1 second after midnight on day 0 of the week determined by your locale (see localtime). This-month means 1 second after midnight on day 1 of the month. This-year means the 1 second after midnight on the first day of the first month. -u, --user Report about users -v, --version Print the version and exit -x, --executable Report about executables SEE ALSO
ausearch(8), auditd(8). Red Hat Sept 2009 AUREPORT:(8)
All times are GMT -4. The time now is 03:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy