03-21-2007
Thanks Jacoden...
actually my reqirement is not just to display those files with zero size but to check if the error log file is of size zero .
pls note that 190_GSTV_HUX_003QISCGSK026_errorXXXXXX.log(Here XXXXXX changes everytime i run the script..it gives the date time)
so i need to check for the error log file size is zero or not among the following:
16 190_GSTV_HUX_003QISCGSK026_messageXXXXX.log
21 190_GSTV_HUX_003QISCGSK026_activityXXXXX.log
10 190_GSTV_HUX_003QISCGSK026_errorXXXXX.log
The above files can b in any order.....
is there any cmd as such which suits my need
Thanks in advance
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a logic like this
It initializes the flag variable as "T" at the beginning of the loop everytime
Inside each loop it checks for two conditions and updates the flag variable as "A" or "B"
In the end of the loop it checks for the value of the variable flag for "A" or "B" and execute... (4 Replies)
Discussion started by: codeman007
4 Replies
2. Shell Programming and Scripting
:)
Hi,
I want to script for this scenerio,
OSR Settings
Scenario : We are looking to find all the *.a files from the following locations in the filesystem of a server.
OSR Directories
/etc
/bin
/usr/bin
/usr/sbin
/var/adm
These *.a files should have the permissions on... (12 Replies)
Discussion started by: sakthilinux
12 Replies
3. Shell Programming and Scripting
Hi all,
I am using the below given sqlplus command in my unix script to invoke a stored procedure which returns a value .It works fine.
RET_CODE=$(/opt/oracle/product/10.2.0.4.CL/bin/sqlplus -S $USER/$PASSWD@$DB_NAME <<EOF
EXEC MY_PKG.MY_SP (:COUNT);
PRINT COUNT;
commit;
... (6 Replies)
Discussion started by: Shri123
6 Replies
4. Shell Programming and Scripting
Hi all,
ssh uname@remote_server 'cat /tmp/remote_file_name > home_dir/a512386/new/local_file_name'
The above given command is working fine.
but if i try to move the file only if exists in the remote server i.e) giving the same within if condition it executes but the file is not stored in my... (1 Reply)
Discussion started by: Shri123
1 Replies
5. Shell Programming and Scripting
Hi,
I am in trouble. I can get inside my condition test inside a loop :
I am in ksh (solaris)
while read file
do
<commande to retrieve file> >> ${LOG_RETRIEVE_FILE.log}
msg_err=$(cat ${LOG_RETRIEVE_FILE.log} | grep "error retrieve")
if ; then
<sendmail>
exit 1
fi
done
I tried... (6 Replies)
Discussion started by: Aswex
6 Replies
6. Shell Programming and Scripting
Hi All,
I want to change the name as SEQ_13
ie., <Property Name="Name">SEQ_13</Property>
when the Stage Type is PxSequentialFile
ie., <Property Name="StageType">PxSequentialFile</Property> :wall:
Input.XML
<Main>
<Record Identifier="V0S13" Type="CustomStage" Readonly="0">... (3 Replies)
Discussion started by: kmsekhar
3 Replies
7. Shell Programming and Scripting
This is what I have so far
grep -lir "some text" *
I need to check all files on the system for this text, if the text is found I need to change the file permissions so only ROOT has read and write access.
How can this be done? (3 Replies)
Discussion started by: mapleleafs89
3 Replies
8. Shell Programming and Scripting
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies
9. Shell Programming and Scripting
I want to check if the string has the substring in IF condition then process...
i tried below but not working
if ];
then
.............
field can be "reserved1" ....reservedn / fillspaces1 ... fillspacesn (4 Replies)
Discussion started by: greenworld123
4 Replies
10. Shell Programming and Scripting
Hi,
I need to perform the untar and rm operation if the file found is a .tar and does not have test.tar or hello.tar as the file names.
Below is the loop to check the same.
for tf in *.tar
do if ]
then found=1
... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT HPUX
vxcmdlog
vxcmdlog(1M) vxcmdlog(1M)
NAME
vxcmdlog - administer command logging
SYNOPSIS
vxcmdlog [-H] [-l] [-m {on|off}] [-n number] [-s size]
DESCRIPTION
The vxcmdlog command is used to administer command logging in Veritas Volume Manager (VxVM). This feature can be used to record all VxVM
commands that are issued, and can be used in conjunction with the transaction logging feature (see vxtranslog(1M)).
When the current log file reaches a maximum size, it is renamed as a historic log file, and a new current log file is created. A limited
number of historic log files is preserved to avoid filling up the file system.
Each log file contains a header that records the host name, host ID, and the date and time that the log was created. See the EXAMPLES sec-
tion below for a description of the entries that are recorded in a log file.
OPTIONS
-H Displays detailed help about the usage of the command.
-l Lists current settings for command logging. This shows whether command logging is enabled, the maximum number of historic log
files, and the maximum log file size.
-m {on|off}
Turns command logging on or off. By default, command logging is turned on.
-n number Sets the maximum number of historic log files to maintain. The default number is 5. If number is set to no_limit, there is no
limit on the number of historic log files that are created.
-s size Sets the maximum size to which a command log can grow. (Note that this setting has no effect on existing historic log files.)
The suffix modifiers k, m, and g may be used express sizes in kilobytes, megabytes and gigabytes respectively. If no suffix is
specified, the default units are kilobytes.
If size is set to no_limit, there is no limit on the size of the log file.
The size of the command log is checked after an entry has been written so the actual size may be slightly larger than that speci-
fied. When the log reaches the specified size, the current command log file, cmdlog, is renamed as the next available historic
log file, cmdlog.number, where number is an integer from 1 up to the maximum number of historic log files that is currently
defined.
If the maximum number of historic log files has been reached, the oldest historic log file is removed, and the current log file
is renamed as that file.
The default maximum size of the command log file is 1m(1MB).
EXAMPLES
Turn on command logging:
vxcmdlog -m on
Set the maximum command log file size to 512KB:
vxcmdlog -s 512k
Set the maximum number of historic command log files to 10:
vxcmdlog -n 10
The following are sample entries from a command log file:
/usr/sbin/vxdctl mode
/usr/sbin/vxdisk -q -o alldgs list
/etc/vx/diag.d/vxprivutil dumpconfig /dev/vx/rdmp/Disk_4s2
/usr/sbin/vxdisk list SENA0_1
Each entry usually contains a client ID that identifies the command connection to the vxconfigd daemon, the process ID of the command, a
time stamp, and the command that was used together with its arguments. If the client ID is 0, as in the third entry shown here, this means
that the command did not open a connection to vxconfigd.
Note: The client ID is the same as that recorded for the corresponding transactions in the transactions log.
FILES
/etc/vx/log Symbolic link to the log directory. This can be redefined if necessary.
/etc/vx/log/cmdlog Current command log.
/etc/vx/log/cmdlog.number
Historic command logs.
NOTES
If vxcmdlog records the invocation of a vxmake command that reads object definitions from a description file, vxcmdlog additionally records
the contents of the description file.
Most command scripts are not logged, but the command binaries that they call are logged. Exceptions are the vxdisksetup, vxinstall, and
vxdiskunsetup scripts, which are logged.
SEE ALSO
vxtranslog(1M)
Veritas Volume Manager Troubleshooting Guide
VxVM 5.0.31.1 24 Mar 2008 vxcmdlog(1M)