Hi,
THe following is the output when i run the command ls -ltr
can anyone explain the meaning of the field in red
-rw-r----- 3 orca orca 20924 Sep 08 19:21 BTL027SASI.gnt
-rw-r----- 3 orca orca 20924 Sep 08 19:21 BTL027RITD.gnt
-rw-r----- 3 orca orca ... (2 Replies)
when I write the command ls -ltr it shows the detail of the files. Like
-rwxrwxrwx 1 mqsiadm mqbrkrs 0 Aug 29 14:03 dspmq_temp
-rwxrwxrwx 1 mqsiadm mqbrkrs 666 Aug 30 06:12 dspmq_script
In this,DATE TIME is shown, Now the question is : how can I see the all the times... (5 Replies)
i have to list some file with certain exemption
suppose for example i have two files
file1.log.1
file1.log.1.123
i want ls -ltr command to list only 1st type of files
so i want like this
ls -ltr *.log.*---------it should grep 1st kind of files but this command greps all the files... (4 Replies)
I am writing a script where in i have to log into a remote machine and check for necessary file by typing (ls -ltr *200505) (this gets all 05month of 2008 yr files) and if files are found get them to the local machine. If not found print a message saying no files on local machine.
When i was... (2 Replies)
Hi,
I need to parse the listing (ls -ltr) in a given directory and get a particular value to see the success or failure. e.g
drwxr-xr-x 5 sensr vpnuser 512 Nov 7 07:46 disc_001811. Here i need to take the value 5 which is after drwxr-xr-x . how to so the same in shell... (1 Reply)
Hi ,
Server details –
Machine hardware: sun4u
OS version: 5.9
Processor type: sparc
Hardware: SUNW,Sun-Fire-880
When I put ls –ltr command I get –
/users/testuser> ls -ltr
-rw-rw-r-- 1 testuser dba 76 Jan 13 2009 ftp.scr
-rwxr-xr-x 1... (6 Replies)
Hi ,
Whenever i try to execute ls with l as an option the system hangs.
The workload on server is not more than 1.
What could be the reason .
Normal ls works fine but ls -l causes the system to hang.
This is happening when i m in /usr/local/sbin directory.
I can see that the... (4 Replies)
Hi All,
I have one requirement, where I need to have output of ls -l command sorted on 1) first on filename 2) last modified time ( descending ) - latest change first.
I am not able to figure out how to do it..
Also I dont have a way to change Date display for ls -ltr command..
I am... (1 Reply)
Could you please let me know what each of the output fields in ls -ltr for a directory imply.
Example :
drwxrwsr-x 4294967295 infamgr infagrp 2147549184 Sep 2 17:01 job
basically would want to know 4294967295 and 2147549184 (6 Replies)
Discussion started by: infernalhell
6 Replies
LEARN ABOUT FREEBSD
audit_submit
AUDIT_SUBMIT(3) BSD Library Functions Manual AUDIT_SUBMIT(3)NAME
audit_submit -- general purpose audit record submission
LIBRARY
Basic Security Module Library (libbsm, -lbsm)
SYNOPSIS
#include <bsm/libbsm.h>
int
audit_submit(short au_event, au_id_t auid, char status, int reterr, const char * restrict format, ...);
DESCRIPTION
The audit_submit() function provides a generic programming interface for audit record submission. This audit record will contain a header,
subject token, an optional text token, return token, and a trailer. The header will contain the event class specified by au_event. The sub-
ject token will be generated based on auid. The return token is dependent on the status and reterr arguments; unlike the argument to
au_to_return, reterr should be a local rather than BSM error number. Optionally, a text token will be created as a part of this record.
Text token output is under the control of a format string that specifies how subsequent arguments (or arguments accessed via the variable-
length argument facilities of stdarg(3)) are converted for output. If format is NULL, then no text token is created in the audit record.
It should be noted that audit_submit() assumes that setaudit(2), or setaudit_addr(2) has already been called. As a direct result, the termi-
nal ID for the subject will be retrieved from the kernel via getaudit(2), or getaudit_addr(2).
RETURN VALUES
If successful, audit_submit will return zero. Otherwise a -1 is returned and the global variable errno is set to indicate the error.
EXAMPLES
#include <bsm/audit.h>
#include <bsm/libbsm.h>
#include <bsm/audit_uevents.h>
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
void
audit_bad_su(char *from_login, char *to_login)
{
struct auditinfo_addr aia;
struct auditinfo ai;
au_id_t aid;
int error;
error = getaudit_addr(&aia, sizeof(aia));
if (error < 0 && errno == ENOSYS) {
error = getaudit(&ai);
if (error < 0)
err(1, "getaudit");
aid = ai.ai_auid;
} else if (error < 0)
err(1, "getaudit_addr");
else
aid = aia.ai_auid;
error = audit_submit(AUE_su, aid, EPERM, 1,
"bad su from %s to %s", from_login, to_login);
if (error != 0)
err(1, "audit_submit");
}
Will generate the following audit record:
header,94,1,su(1),0,Mon Apr 17 23:23:59 2006, + 271 msec
subject,root,root,wheel,root,wheel,652,652,0,0.0.0.0
text,bad su from from csjp to root
return,failure : Operation not permitted,1
trailer,94
SEE ALSO auditon(2), getaudit(2), libbsm(3), stdarg(3)HISTORY
The audit_submit() function first appeared in OpenBSM version 1.0. OpenBSM 1.0 was introduced in FreeBSD 7.0.
AUTHORS
The audit_submit() function was written by Christian S.J. Peron <csjp@FreeBSD.org>.
BSD January 18, 2008 BSD