I have newbie,
which i use for checking last one hours log file,
but i want to check 2 minutes log and discard old log, only match current time with last 2 minutes.
Ex log.
i want command to grep log only 2 min from last line.
example 2018-07-03 20:10:00 - 2018-07-03 20:11:59
I need to know if anyone can assist me on how to grab the last (we'll just say "x" minutes) of a log file. How do you tell the grep command without specifying an exact window of time? (So relative instead of absolute.)
Thanks,
Jon (2 Replies)
Dear Guru's
I've a requirment to grep for a string in series of log files that are getting generated almost every minute.
I'm looking to schedule a script every 15 mountes,in order to check if the error string has been generated in any of the log files generated in last 15 minutes.
Please... (3 Replies)
RHEL 5.8
In the directory /u03/pkms/app_logs I have several hundreds of log files as shown below.
$ pwd
/u03/pkms/app_logs
$ ls -alrt *.log | tail -50
-rw-r----- 1 oracle dba 9439232 May 4 13:57 mvtpcem_1_722892404_94157.log
-rw-r----- 1 oracle dba 9227264 May 4 13:57... (8 Replies)
Hi All,
Below script will make a copy of the existing log file with the then timestamp details.
I am looking to create a copy of the existing log file for every 60 minutes and when the file limit reaches to 5, the 6th copy should overwrite the first backedup file which means all the time it... (3 Replies)
I have below command, which i use for checking last two hours log file, but i want to check 30 minutes log and discard old log, only match current time with last 30 minutes. Command i am using. This below attach log file format is for this week, but sometime it got change in time of log, so i need... (6 Replies)
OS : Red Hat Linux 6.4
Shell : Bash
We have a file called status.txt which will have only 1 line. The content will be the string "Processing" for most of the day.
# cat status.txt
Processing
#I want to write a shell script (notify.sh) which will be executing a grep every 10 minutes .
... (7 Replies)
Hi, please help with below time conversion to minutes.
one column values:
2 minutes 16 seconds 420 msec
43 seconds 750 msec
0 days 3 hours 29 minutes 58 seconds 480 msec
11 seconds 150 msec
I need output in minutes(total elapsed time in minutes) (2 Replies)
Hi all,
System Ubuntu 16.04.3 LTS
i have the following log
INFO 2019-02-07 15:13:31,099 module.py:700] default: "POST /join/8550614e-3e94-4fa5-9ab2-135eefa69c1b HTTP/1.0" 500 2042
INFO 2019-02-07 15:13:31,569 module.py:700] default: "POST /join/6cb9c452-dcb1-45f3-bcca-e33f5d450105... (15 Replies)
Discussion started by: charli1
15 Replies
LEARN ABOUT MOJAVE
lpoptions
lpoptions(1) Apple Inc. lpoptions(1)NAME
lpoptions - display or set printer options and defaults
SYNOPSIS
lpoptions [ -E ] [ -h server[:port] ] -d destination[/instance] [ -l ]
lpoptions [ -E ] [ -h server[:port] ] [ -p destination[/instance] ] -o option[=value] ...
lpoptions [ -E ] [ -h server[:port] ] [ -p destination[/instance] ] -r option
lpoptions [ -E ] [ -h server[:port] ] -x destination[/instance]
DESCRIPTION
lpoptions displays or sets printer options and defaults. If no printer is specified using the -p option, the default printer is used as
described in lp(1).
If no -l, -o, or -r options are specified, the current options are reported on the standard output.
Options set with the lpoptions command are used by the lp(1) and lpr(1) commands when submitting jobs.
When run by the root user, lpoptions gets and sets default options and instances for all users in the /etc/cups/lpoptions file. Otherwise,
the per-user defaults are managed in the ~/.cups/lpoptions file.
OPTIONS
lpoptions supports the following options:
-E Enables encryption when communicating with the CUPS server.
-d destination[/instance]
Sets the user default printer to destination. If instance is supplied then that particular instance is used. This option overrides
the system default printer for the current user.
-h server[:port]
Uses an alternate server.
-l Lists the printer specific options and their current settings.
-o option[=value]
Specifies a new option for the named destination.
-p destination[/instance]
Sets the destination and instance, if specified, for any options that follow. If the named instance does not exist then it is cre-
ated. Destinations can only be created using the lpadmin(8) program.
-r option
Removes the specified option from the named destination.
-x destination[/instance]
Removes the options for the named destination and instance, if specified. If the named instance does not exist then this does noth-
ing. Destinations can only be removed using the lpadmin(8) command.
FILES
~/.cups/lpoptions - user defaults and instances created by non-root users.
/etc/cups/lpoptions - system-wide defaults and instances created by the root user.
CONFORMING TO
The lpoptions command is unique to CUPS.
SEE ALSO cancel(1), lp(1), lpadmin(8), lpr(1), lprm(1), CUPS Online Help (http://localhost:631/help)
COPYRIGHT
Copyright (C) 2007-2018 by Apple Inc.
10 April 2018 CUPS lpoptions(1)