Move all .log except those generated in the last 5 minutes
RHEL 5.8
In the directory /u03/pkms/app_logs I have several hundreds of log files as shown below.
I want to move all .log files to another location /u05/nmbs/may13, but skip those .log files which was
generated within the last 5 minutes. How can I do this ?
Hi
I need to get the last generated file in a directory using ls -ltr. I need to store the output of ls -ltr in a variable.
it will like this
$xyz = -rw-rw-r-- 1 sblp003 siebel 1060 Dec 18 13:33
from this output, I need to do a substring to get this value alone "Dec 18... (8 Replies)
Hi,
I need to move a certain number of files every 10 minutes from one folder to another. I have written the script below, however its not working, please advise.
#! /bin/ksh
start()
{
mv /test1/$(head -1000 /movetst) /test2/
sleep 600
}
stop()
{
exit
}
ls ti* >... (1 Reply)
I'm using Ubuntu and I have a text file I want to FTP to a web server every 5 minutes. I want to overwrite the existing file every time so I don't have tons of the same file. (10 Replies)
HI All,
I have a log file where the logs will be in the format as given below:
2011-05-25 02:32:51 INFO PROCESS STARTING
2011-05-25 02:32:52 INFO PROCESS STARTED
.
.
.
I want to retrieve only the logs which are less than 5 mins older than current time using grep... (3 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)
Team,
I have prepared a script which I run from my remote machine(Jump-box)server
Below is the script
FILEDATE=`date +%F`
LOGFILE=/home/abc/scripts/xyz.$FILEDATE.log
find /home/abc/scripts/xyz.*.log -type f -mtime -3 -delete
touch $LOGFILE
exec 1>$LOGFILE 2>&1
#healthcheck batch runs... (1 Reply)
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 HPUX
dtsearchretrieve
DtSearchRetrieve(library call) DtSearchRetrieve(library call)
NAME
DtSearchRetrieve -- Return clear text of documents from DtSearch databases
SYNOPSIS
#include <Dt/Search.h>
int DtSearchRetrieve(
char *dbname,
DB_ADDR dba,
char **cleartext,
long *clearlen,
int *fzkeyi);
DESCRIPTION
DtSearchRetrieve retrieves the uncompressed document text of a specified DtSearch document listed in the DtSrResult list from a previous
call to DtSearchQuery. It will be successful only in an AusText type database where the documents are stored directly in a database reposi-
tory.
ARGUMENTS
dbname Specifies which database the document is stored in. It can be any one of the database name strings returned from DtSearchInit or
DtSearchReinit. If dbname is NULL, the first database name string is used.
dba The database address of the desired record from the DtSrResult.dba field in a search results list.
cleartext Specifies a pointer where a zero terminated C string containing the document text will be stored. The string is allocated storage
that will be freed by the next call to this function.
clearlen Specifies a pointer where the length of the cleartext string will be stored.
fzkeyi This is a reserved argument. It should always be NULL.
RETURN VALUE
DtSearchRetrieve returns DtSrOK as well as the cleartext string, when document retrieval is completely successful.
It returns DtSrNOTAVAIL if the document text is not available from the database for whatever reason.
Any other return code signifies failure and user messages on the MessageList explain why.
Any API function can also return DtSrREINIT and the return codes for fatal engine errors at any time.
SEE ALSO dtsrcreate(1), DtSrAPI(3), DtSearchQuery(3), DtSearch(5)
DtSearchRetrieve(library call)