Trying to sort grep result based on timestamp of the filename.
I have the following result and want to sort them on timestamp
Thanks in Advance for your time and help
Dear all,
Please advice how do I sort a file based on timestamp information. I want to sort the second column in asc/desc order which has timestamp information in format YYYY-MM-DD HH:MM:SS
Example
File - Input.txt contains
cat ss.txt
100|2009-03-30 11:38:43
141|2009-06-01 12:12:01... (1 Reply)
Hi
I have a requirement like below
I need to sort the files based on the timestamp in the file name and run them in sorted order and then archive all the files which are one day old to temp directory
My files looks like this
PGABOLTXML1D_201108121235.xml... (1 Reply)
Hello.
I want to get all modules which are loaded and which name are exactly 2 characters long and not more than 2 characters and begin with "nv"
lsmod | (e)grep '^nv????????????
I want to get all modules which are loaded and which name begin with "nv" and are 2 to 7 characters long
... (1 Reply)
Hi All,
I am new to Perl. I have a scenario to code. In a folder I have number of files and they will start with P01 or P02 or P03 and so on..I have to sort them on name first and then on time stamp.
Ex.
File name timestamp
P01_file1.txt 1PM
P02_file1.txt 1AM
P01_file2.txt 2PM... (12 Replies)
Hi I would appreciate your help with this.
I have a output file from a command. It is broken based on initial of the users. Exmaple of iitials MN & SS. Under each section there is information pertaining to the user however each section can have different number of lines. MY challenge is to ... (5 Replies)
Hello,
I have a sample file with the below contents :
Backup Oracle8_P112_PEGA_Archivedel Completed full 10/11/2015 03:50:06PM
Backup Oracle8_G567_PEGA_Archivedel Completed full 10/11/2015 01:15:56PM
Backup Oracle8_P112_PEGA_Archivedel Completed full ... (8 Replies)
Used below command to get list of files sorted by timestamp
find -L . -type f -name '*dat*' | xargs ls -ltrg
I want to get only the filenames so I tried adding basename but it doenst work , can some one advise on how to get only file name (1 Reply)
So basically I have a log file and each line in this log file starts with a timestamp:
MON DD HH:MM:SS
SEP 15 07:30:01
I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies
LEARN ABOUT HPUX
kclog
kclog(1M)kclog(1M)NAME
kclog - manage kernel configuration log file
SYNOPSIS
config] string] type] name] [count]
comment
DESCRIPTION
is the administrative command for the HP-UX kernel configuration log file. The log file is automatically maintained by all of the kernel
configuration commands (and Any change to any kernel configuration gets logged to this log file, which is located at Note that this file is
a plain text file which can be viewed and manipulated using standard Unix file management commands; exists simply for convenience in find-
ing particular log file entries.
Under normal usage, prints the last count entries in the log file. When one of the options is specified, prints the last count entries
that match the specified criteria. If count is not specified, it defaults to 1.
Options
will print all entries matching criteria. If this option is not specified,
will only print the last count entries that match the specified criteria.
will print only log file entries describing changes to the saved
kernel configuration named config. If this option is not specified, will print log file entries describing changes to any
saved or running kernel configuration.
will not print any entries. Instead,
will create a new entry, as if a kernel configuration change had been made, containing the specified comment. This option
is only allowed for users with appropriate privileges.
will print only log file entries that contain the given
string.
will print only log file entries that refer to a configuration object
(module or tunable) of the given name.
will print only log file entries that refer to configuration objects
of the specified type: or
RETURN VALUE
returns zero for success. It returns non-zero and prints a diagnostic message if an error occurs.
EXAMPLES
To see the last three entries in the log:
To see the last entry for the tunable
To see the last five entries for module changes:
To see all entries for module changes:
To see the last entry mentioning Aberdeen:
WARNINGS
The format of the log file may be changed without notice.
Some configuration changes can be made without using the kernel configuration commands. No log file entries are made for such changes.
The log file should not be manually edited. Doing so may cause to behave unpredictably.
SEE ALSO kcmodule(1M), kconfig(1M), kctune(1M), kconfig(5).
available on
kclog(1M)