LOGSAVE(8) System Manager's Manual LOGSAVE(8)NAME
logsave - save the output of a command in a logfile
SYNOPSIS
logsave [ -asv ] logfile cmd_prog [ ... ]
DESCRIPTION
The logsave program will execute cmd_prog with the specified argument(s), and save a copy of its output to logfile. If the containing
directory for logfile does not exist, logsave will accumulate the output in memory until it can be written out. A copy of the output will
also be written to standard output.
If cmd_prog is a single hyphen ('-'), then instead of executing a program, logsave will take its input from standard input and save it in
logfile
logsave is useful for saving the output of initial boot scripts until the /var partition is mounted, so the output can be written to
/var/log.
OPTIONS -a This option will cause the output to be appended to logfile, instead of replacing its current contents.
-s This option will cause logsave to skip writing to the log file text which is bracketed with a control-A (ASCII 001 or Start of
Header) and control-B (ASCII 002 or Start of Text). This allows progress bar information to be visible to the user on the console,
while not being written to the log file.
-v This option will make logsave to be more verbose in its output to the user.
AUTHOR
Theodore Ts'o (tytso@mit.edu)
SEE ALSO fsck(8)E2fsprogs version 1.44.1 March 2018 LOGSAVE(8)
Check Out this Related Man Page
LOGSAVE(8) System Manager's Manual LOGSAVE(8)NAME
logsave - save the output of a command in a logfile
SYNOPSIS
logsave [ -asv ] logfile cmd_prog [ ... ]
DESCRIPTION
The logsave program will execute cmd_prog with the specified argument(s), and save a copy of its output to logfile. If the containing
directory for logfile does not exist, logsave will accumulate the output in memory until it can be written out. A copy of the output will
also be written to standard output.
If cmd_prog is a single hyphen ('-'), then instead of executing a program, logsave will take its input from standard input and save it in
logfile
logsave is useful for saving the output of initial boot scripts until the /var partition is mounted, so the output can be written to
/var/log.
OPTIONS -a This option will cause the output to be appended to logfile, instead of replacing its current contents.
-s This option will cause logsave to skip writing to the log file text which is bracketed with a control-A (ASCII 001 or Start of
Header) and control-B (ASCII 002 or Start of Text). This allows progress bar information to be visible to the user on the console,
while not being written to the log file.
-v This option will make logsave to be more verbose in its output to the user.
AUTHOR
Theodore Ts'o (tytso@mit.edu)
SEE ALSO fsck(8)E2fsprogs version 1.44.1 March 2018 LOGSAVE(8)
Hi all,
I need to pull the (last section) from the header to the end of file. This logfile will have many sections appended, but I only need to capture the last one and email it to someone. Any ideas? Thanks Kathy
Example Logfile:
=============
= BOX : SAPCFI
= JOB : SAPCFI
=... (9 Replies)
Hi experts,
I need help to sort a big logfile.
logfile:
-------
67712 dkjd
jd jj jjjj
------
kjkj
jhjh kkk yggg
lll hhh gffgf jj
--------
i
kkk
kllkkl
-------
Now I want every think between the "------" in one line.
Normaly with paste no problem but you can see that the... (7 Replies)
guys..
I have a requirement like this. I need to write the output of a log file into a table. the logfile looks something like this
SV_NAME CC_NAME CP_DISP_RUN_STATE
------- ------------------- -----------------
sble01 ALLTEL WorkMon24Hrs Running
I... (16 Replies)
Hi All,
I wrote a script to send a mail if a particular logfile did not get updated since 5 mins. Here is the Script.
log=`date +%e_%b_%Y`.log # returns todays logfile
x=`date -r $log` # returns last modification time of the Log file
h1=`expr substr "$x" 12 2`
m1=`expr substr "$x" 15 2`... (5 Replies)
Hi ,
Can someone help me,I am not well versed with scripting,it is very urjent.
Need a script in perl or shell for the following task.
The logfile contains several entries of which one particular string to be searched and that complete line has to be removed and copied to another file to... (25 Replies)
Hi guys
i must write a program which read logfile of my program and print the result.
i wrote this and i want print of the user who have virus.
i extract user and put it in file, now i want know each user have how many virus.
how can i do this in bash, my file is like:
and soso
i... (5 Replies)
I have got problems saving sed changes to the same file in a loop.
Basically I want the delimited value in every line of the file to be set to blank according to the value stored in var. var can be changed anytime.
I do not have sed -i and i've tried to mv the file. Any other ideas?
My file... (8 Replies)
Hello all
Hoping someone would be kind enough to suggest a solution to a problem i have, and see if maybe i can even do this without a script.
Essentially i have a very large log file, and within it each line had a value called TTMT, and it records a variable number in the following way, so... (6 Replies)
Hi,
I've a logfile which i need to parse and get the logs depending upon the user input. here, i'm providing an option to enter the string which can be matched with the log entries.
e.g. one of the logfile entry reads like this -
$str = " mpgw(BLUESOAPFramework):... (6 Replies)
Hi,
I have a log file like exyymmdd.log and i need to do is read the log file and inside the logfile if i find the word which starts with PQR002106570.book then i need to replace the value of PQRXXX.book(this is unique) with its corresponding title. A list of id(PQRXXX.book) and its title are... (5 Replies)
Hi,
I have a problem with my logfile. I am redirecting my output to log file and when iam viewing as text doc it is looking with some nonsense characters...please do help me on this .thank you.
here is my logfile which it is showing different behaviour:
spawn
spawn minicom
Welcome... (6 Replies)
Hi,
I need to continuously monitor a logfile to get the log information between a process start and end.
the logfile look like this
abcdddddddddd
cjjckkkkkkkkkkkk
abc : Process started
aaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbbbbbbb
abc... (6 Replies)
logfile="/var/tmp.log"
output=$(grep "ERROR" $logfile)
if
then
echo "exceptions logged , please check /var/tmp.log for more details" |\
mail -s "exceptions logged , please check /var/tmp.log on for more details" $DL
else
echo "not found"
fi
Somehow its not working as... (5 Replies)
Hello,
How to tail -f logfile. if log file is gennerate every 1 HR.
I want it works automatically all the time. never changes it by manual.
Thank
ls -trl CybertonTransaction.*
-rw-r--r-- 1 autobot robot 617071 Jul 9 00:02 CybertonTransaction.20130709-00.log
-rw-r--r-- 1 autobot ... (12 Replies)
What does this do:
f{
local logfile=$1
] && logfile=$AMS_LOGFILE
echo -e "--"
}
Can someone please guide me what does
a) local variable do
b) -z option stands for what?
c) what other options are there (like -n, or -e, .., which man page do i refer to go through these... (6 Replies)