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!,
In my shell scripts, I always create a logfile by adding the following line in the beginning:
exec >file.log 2>&1
This in turn directs all the output to this logfile till the script executes.
But now, I have to write some output to the monitor for the users.
So, i am doing it... (2 Replies)
Hello all. Is there a way to redirect output to more than one file at a time?
I have a method1() that writes to a logfile. In the method cksums are done on files by doing a
"for i in `ls`; do
cksum $i > $LOGFILE
done
"
In the logfile I want to show the cksums under each directory like... (2 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)
I have a file which is written by an ongoing process (actually it is a logfile). I want to trim this logfile with a script and save the trimmed portion to another file or display it to <stdout> (it gets picked up there by another process).
Fortunately my logfile has a known format (XML) and i... (3 Replies)
Hi,
How to write a script which checks the size of a log file?
I want that the log file contents to get cleared as soon as it increases 1 KB.
Thanks (3 Replies)
Hi All,
I have a log file and I want to parse the logfile with a script.A sample text is shown below:
I would grep on "return code " on this file. Any idea how the lines above and below the grep patterns could also be extracted.
Thanks!
nua7
The runLoggingInstall return code is 0... (3 Replies)
I am executing a stored proc and sending the results in a log file. I then want to grab one result from the output parameters (bolded below, 2) so that I can store it in a variable which will then be called in another script. There are more details that get printed in the beginning of the log file,... (3 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)
I'm redirecting the output of a command to a logfile, however, if the user is on a terminal I would also like the output to be displayed on the screen.
tar tvf some_tarfile >Logfile
if the user is on a term then have the output to the Logfile and also be displayed on the screen at the same... (2 Replies)
Hi Dudes,
Can you please suggest me how to create a logfile to track the below script output ? Thanks
#!/bin/ksh
# backup the "std" I/P file descriptor
exec 5<&0
#echo "Proceed ?"
while read config_line; do
# backup the I/P file descriptor of "while" block
exec 6<&0
# restore the... (2 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 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)
Bonjour,
I've wrote a script to monitor a logfile in realtime. It is working almost perfeclty except for two things.
The script use the following technique :
tail -fn0 $logfile | \
while read line ; do
... some stuff
done
First one, I'd like a way to end the monitoring script if a... (3 Replies)