01-14-2009
Return code is "0" though the command fails.
The return code is "0" though the command fails. How to get a return code of "1" for this command when it fails or modify the command to get the right return code?
On HP UNIX
#-------- SCRIPT ----
#!/bin/ksh
find /opt/oracle/oroem/product/10.2.0.4/rdbms/audit/ \( -name "*.aud" \) -mtime +1 -exec rm -f {} \;
echo "Return Error Code" $?
------------------OUTPUT-------------
> b.sh
rm: /opt/oracle/oroem/product/10.2.0.4/rdbms/audit/ora_12289.aud not removed. Permission denied
Return Error Code 0
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to take a string (stringA) check it for spaces and replace any spaces found with an equal (=) sign.
This is not working. There are spaces between each component:
$StringA | tr "" ""
The error returned is:
test: Specify a parameter with this command
Can you help? (3 Replies)
Discussion started by: by_tg
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
While I am using "|" to join multiple commands, I am not getting the return code when there is error in one of the commnads.
Eg:
b=`find /path/a*.out | xargs basename`
if ; then
echo "Error"
fi
if there is error while finding the file or getting the basename, the $? is... (6 Replies)
Discussion started by: new_learner
6 Replies
3. UNIX for Dummies Questions & Answers
I would like to know what means this error and how to fix it
Command 'rm -f -r "0yfOYy-0008Nq-2j-32233-K"'
failed with return code 1 and error message
Thank you (3 Replies)
Discussion started by: linuxbee
3 Replies
4. UNIX for Dummies Questions & Answers
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
5. UNIX for Advanced & Expert Users
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
6. Shell Programming and Scripting
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
7. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
8. UNIX for Dummies Questions & Answers
I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this:
$ look "string" "/home/patrick/filename.txt"
However, this gives me the following message:
"look: /home/patrick/filename.txt: File too large"
So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies
9. UNIX for Dummies Questions & Answers
I was trying to edit the crontab file for root. I had saved off the existing file for later recovery. When I typed crontab -e to edit, the system returned "413" and the cursor stopped blinking.
Ctrl+c stopped that. I typed, in bash, "EDITOR=vi" (Enter). Then, "export EDITOR" (Enter). Then,... (2 Replies)
Discussion started by: roadmanjim
2 Replies
10. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
auditd(1m) auditd(1m)
NAME
auditd - Starts the DCE Audit Daemon.
SYNOPSIS
auditd [-t trail_file] [-a] [-s size] [-wrap] [-w svc_route] [-d debug_level]
OPTIONS
Specifies the pathname of the audit trail file used by the Audit daemon. The default path of the audit trail file is dcelo-
cal/var/aud/adm/central_trail. If an audit trail file name (instead of an absolute pathname) is specified, the file will be created in the
dcelocal/var/aud/adm/ directory. Audits the Audit daemon's control interface access. Sets a warning threshold on the size of the audit
trail file. The Audit daemon displays a warning message each time an audit record is appended to the audit trail after the threshold has
been reached. Wraps the recording of audit events to the beginning of the audit trail file when its size limit is reached. The default
action when the size limit has been reached is to stop auditing. Specifies where each level of serviceability messages are routed. The
svc_route argument is divided into three fields, separated by colons - the level, a routing identifier, and a routing parameter:
severity:how:where
See svcroute(5) for possible values for these fields. Specifies debugging level of sub-components. The debug_level argument contains four
fields separated by a colon:
component:flags:how:where
See svcroute(5) for possible values of these fields.
DESCRIPTION
The auditd command starts the Audit daemon. The Audit daemon must be run on the host before the audit clients.
The Audit daemon can only service audit clients that are on the host where it is running. Thus, an Audit daemon must be installed and run
on every host in the cell that has audit clients (audit clients include DCE servers and user-written application servers).
The Audit daemon has two functions. It maintains the filter files which are shared by all audit clients running on the host. It also pro-
vides an audit record logging service to these clients.
The Audit daemon runs under the local host's machine principal identity (host/hostname/self).
A DCE Host daemon (dced) must be running on the local host when auditd is started. Typically, dced and auditd are started at boot time.
The auditd process places itself in the background and sends messages indicating it is ready to service requests for updating or querying
filters and logging audit records.
Privileges Required
You must be logged into a privileged account (cell_admin or a member of the audit-admin group) to be able to run auditd.
EXAMPLES
The following example starts the Audit daemon using the default audit trail file (dcelocal/var/aud/adm/central_trail): $ auditd
The following example starts the Audit daemon and specifies my_trail_file as the audit trail file. $auditd -t my_trail_file
The following example starts the Audit daemon and specifies where each level of serviceability messages is going to be routed. $ auditd -w
FATAL:FILE:/dev/console -w NOTICE:FILE:/opt/dcelocal/var/audit/adm/svc_log
The following example starts the Audit daemon and specifies the debugging level. $ auditd -d 1,esl.9
RELATED INFORMATION
aud(1m), audevents(1m), audfilter(1m), audtrail(1m), dcecp(1m).
auditd(1m)