Sponsored Content
Top Forums UNIX for Dummies Questions & Answers row count of all files with more than 0 byte Post 302190333 by sri2005 on Tuesday 29th of April 2008 10:35:58 AM
Old 04-29-2008
amit,

My question i how to get all the counts for all files at a time in current directory..If i have 100 files which have greater than 0 byte i need to get count of all files at a time...in that particular directory
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

byte count and cut command

1. Is there a way to count the number of bytes of a variable? example: abc@yahoo.com is 13 bytes 2. Cut command only allows one byte for delimiter example: cut -f1 -d'.' delimited by period. Is there a way to have two or more characters in the delimiter field? thanks in adavance. :) (4 Replies)
Discussion started by: hemangjani
4 Replies

2. Shell Programming and Scripting

Check if 2 files are identical byte-to-byte?

In my server migration requirement, I need to compare if one file on old server is exactly the same as the corresponding file on the new server. For diff and comm, the inputs need to be sorted. But I do not want to disturb the content of the file and need to find byte-to-byte match. Please... (4 Replies)
Discussion started by: krishmaths
4 Replies

3. Shell Programming and Scripting

row count of 60 files in one file

hi all plz some unix guy help me in this i have 60 files which will have some records i want to find the total number of records in all the 60 files like file1 has 60 and file2 has 70 record i want to sum all these and find total row count in 60 files (5 Replies)
Discussion started by: er_zeeshan05
5 Replies

4. UNIX for Dummies Questions & Answers

Script to get Row Count of ZIP Files

Hi, I have some data files in a zipped format.(eg: aa.gz).I would like to know the number or rows in each zip file(May be populate the file name and line numbers into a text file).I know the commands wc -l and gunzip,.But how I will create a shell script for this to extract each files and get... (5 Replies)
Discussion started by: abhilash_menon
5 Replies

5. Shell Programming and Scripting

count identical strings print last row and count

I have a sorted file like: Apple 3 Apple 5 Apple 8 Banana 2 Banana 3 Grape 31 Orange 7 Orange 13 I'd like to search $1 and if $1 is not the same as $1 in the previous row print that row and print the number of times $1 was found. so the output would look like: Apple 8 3 Banana... (2 Replies)
Discussion started by: dcfargo
2 Replies

6. Shell Programming and Scripting

Count the delimeter from a file and delete the row if delimeter count doesnt match.

I have a file containing about 5 million rows, in the file there are some records which has extra delimiter at random position. (we dont know the positions), now we have to Count the delimeter from each row and if the count of delimeter is not matching then I want to delete those rows from the... (5 Replies)
Discussion started by: Akumar1
5 Replies

7. UNIX for Advanced & Expert Users

row count

Hi, I want a row count of a file incliding header and trailer If I do cat Filename | wc -l then I am only getting the row count excluding the header and trailer Buit I want the row count including Header and trailer Please help Many thanks in advance, Pragyan (3 Replies)
Discussion started by: prarat
3 Replies

8. UNIX for Dummies Questions & Answers

Ls directory size reporting byte size instead of file count

I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms. Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Discussion started by: jmgibby
2 Replies

9. Shell Programming and Scripting

Error files count while coping files from source to destination locaton as well count success full

hi All, Any one answer my requirement. I have source location src_dir="/home/oracle/arun/IRMS-CM" My Target location dest_dir="/home/oracle/arun/LiveLink/IRMS-CM/$dc/$pc/$ct" my source text files check with below example.text file content $fn "\t" $dc "\t" $pc "\t" ... (3 Replies)
Discussion started by: sravanreddy
3 Replies

10. Shell Programming and Scripting

Split files based on row delimiter count

I have a huge file (around 4-5 GB containing 20 million rows) which has text like: <EOFD>11<EOFD>22<EORD>2<EOFD>2222<EOFD>3333<EORD>3<EOFD>44<EOFD>55<EORD>66<EOFD>888<EOFD>9999<EORD> Actually above is an extracted file from a Sql Server with each field delimited by <EOFD> and each row ends... (8 Replies)
Discussion started by: amvip
8 Replies
audit.log(4)							   File Formats 						      audit.log(4)

NAME
audit.log - audit trail file SYNOPSIS
#include <bsm/audit.h> #include <bsm/audit_record.h> DESCRIPTION
audit.log files are the depository for audit records stored locally or on an on an NFS-mounted audit server. These files are kept in direc- tories named in the file audit_control(4) using the dir option. They are named to reflect the time they are created and are, when possible, renamed to reflect the time they are closed as well. The name takes the form yyyymmddhhmmss.not_terminated.hostname when open or if the auditd(1M) terminated ungracefully, and the form yyyymmddhhmmss.yyyymmddhhmmss.hostname when properly closed. yyyy is the year, mm the month, dd day in the month, hh hour in the day, mm minute in the hour, and ss second in the minute. All fields are of fixed width. Audit data is generated in the binary format described below; the default for Solaris audit is binary format. See audit_syslog(5) for an alternate data format. The audit.log file begins with a standalone file token and typically ends with one also. The beginning file token records the pathname of the previous audit file, while the ending file token records the pathname of the next audit file. If the file name is NULL the appropriate path was unavailable. The audit.log files contains audit records. Each audit record is made up of audit tokens. Each record contains a header token followed by various data tokens. Depending on the audit policy in place by auditon(2), optional other tokens such as trailers or sequences may be included. The tokens are defined as follows: The file token consists of: token ID 1 byte seconds of time 4 bytes microseconds of time 4 bytes file name length 2 bytes file pathname N bytes + 1 terminating NULL byte The header token consists of: token ID 1 byte record byte count 4 bytes version # 1 byte [2] event type 2 bytes event modifier 2 bytes seconds of time 4 bytes/8 bytes (32-bit/64-bit value) nanoseconds of time 4 bytes/8 bytes (32-bit/64-bit value) The expanded header token consists of: token ID 1 byte record byte count 4 bytes version # 1 byte [2] event type 2 bytes event modifier 2 bytes address type/length 1 byte machine address 4 bytes/16 bytes (IPv4/IPv6 address) seconds of time 4 bytes/8 bytes (32/64-bits) nanoseconds of time 4 bytes/8 bytes (32/64-bits) The trailer token consists of: token ID 1 byte trailer magic number 2 bytes record byte count 4 bytes The arbitrary data token is defined: token ID 1 byte how to print 1 byte basic unit 1 byte unit count 1 byte data items (depends on basic unit) The in_addr token consists of: token ID 1 byte IP address type/length 1 byte IP address 4 bytes/16 bytes (IPv4/IPv6 address) The expanded in_addr token consists of: token ID 1 byte IP address type/length 4 bytes/16 bytes (IPv4/IPv6 address) IP address 16 bytes The ip token consists of: token ID 1 byte version and ihl 1 byte type of service 1 byte length 2 bytes id 2 bytes offset 2 bytes ttl 1 byte protocol 1 byte checksum 2 bytes source address 4 bytes destination address 4 bytes The expanded ip token consists of: token ID 1 byte version and ihl 1 byte type of service 1 byte length 2 bytes id 2 bytes offset 2 bytes ttl 1 byte protocol 1 byte checksum 2 bytes address type/type 1 byte source address 4 bytes/16 bytes (IPv4/IPv6 address) address type/length 1 byte destination address 4 bytes/16 bytes (IPv4/IPv6 address) The iport token consists of: token ID 1 byte port IP address 2 bytes The path token consists of: token ID 1 byte path length 2 bytes path N bytes + 1 terminating NULL byte The path_attr token consists of: token ID 1 byte count 4 bytes path count null-terminated string(s) The process token consists of: token ID 1 byte audit ID 4 bytes effective user ID 4 bytes effective group ID 4 bytes real user ID 4 bytes real group ID 4 bytes process ID 4 bytes session ID 4 bytes terminal ID port ID 4 bytes/8 bytes (32-bit/64-bit value) machine address 4 bytes The expanded process token consists of: token ID 1 byte audit ID 4 bytes effective user ID 4 bytes effective group ID 4 bytes real user ID 4 bytes real group ID 4 bytes process ID 4 bytes session ID 4 bytes terminal ID port ID 4 bytes/8 bytes (32-bit/64-bit value) address type/length 1 byte machine address 4 bytes/16 bytes (IPv4/IPv6 address) The return token consists of: token ID 1 byte error number 1 byte return value 4 bytes/8 bytes (32-bit/64-bit value) The subject token consists of: token ID 1 byte audit ID 4 bytes effective user ID 4 bytes effective group ID 4 bytes real user ID 4 bytes real group ID 4 bytes process ID 4 bytes session ID 4 bytes terminal ID port ID 4 bytes/8 bytes (32-bit/64-bit value) machine address 4 bytes The expanded subject token consists of: token ID 1 byte audit ID 4 bytes effective user ID 4 bytes effective group ID 4 bytes real user ID 4 bytes real group ID 4 bytes process ID 4 bytes session ID 4 bytes terminal ID port ID 4 bytes/8 bytes (32-bit/64-bit value) address type/length 1 byte machine address 4 bytes/16 bytes (IPv4/IPv6 address) The System V IPC token consists of: token ID 1 byte object ID type 1 byte object ID 4 bytes The text token consists of: token ID 1 byte text length 2 bytes text N bytes + 1 terminating NULL byte The attribute token consists of: token ID 1 byte file access mode 4 bytes owner user ID 4 bytes owner group ID 4 bytes file system ID 4 bytes node ID 8 bytes device 4 bytes/8 bytes (32-bit/64-bit) The groups token consists of: token ID 1 byte number groups 2 bytes group list N * 4 bytes The System V IPC permission token consists of: token ID 1 byte owner user ID 4 bytes owner group ID 4 bytes creator user ID 4 bytes creator group ID 4 bytes access mode 4 bytes slot sequence # 4 bytes key 4 bytes The arg token consists of: token ID 1 byte argument # 1 byte argument value 4 bytes/8 bytes (32-bit/64-bit value) text length 2 bytes text N bytes + 1 terminating NULL byte The exec_args token consists of: token ID 1 byte count 4 bytes text count null-terminated string(s) The exec_env token consists of: token ID 1 byte count 4 bytes text count null-terminated string(s) The exit token consists of: token ID 1 byte status 4 bytes return value 4 bytes The socket token consists of: token ID 1 byte socket type 2 bytes remote port 2 bytes remote Internet address 4 bytes The expanded socket token consists of: token ID 1 byte socket domain 2 bytes socket type 2 bytes local port 2 bytes address type/length 2 bytes local port 2 bytes local Internet address 4 bytes/16 bytes (IPv4/IPv6 address) remote port 2 bytes remote Internet address 4 bytes/16 bytes (IPv4/IPv6 address) The seq token consists of: token ID 1 byte sequence number 4 bytes The privilege token consists of: token ID 1 byte text length 2 bytes privilege set name N bytes + 1 terminating NULL byte text length 2 bytes list of privileges N bytes + 1 terminating NULL byte The use-of-auth token consists of: token ID 1 byte text length 2 bytes authorization(s) N bytes + 1 terminating NULL byte The command token consists of: token ID 1 byte count of args 2 bytes argument list (count times) text length 2 bytes argument text N bytes + 1 terminating NULL byte count of env strings 2 bytes environment list (count times) text length 2 bytes env. text N bytes + 1 terminating NULL byte The ACL token consists of: token ID 1 byte type 4 bytes value 4 bytes file mode 4 bytes The zonename token consists of: token ID 1 byte name length 2 bytes name <name length> including terminating NULL byte ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |: | +-----------------------------+-----------------------------+ | binary file format |Evolving | +-----------------------------+-----------------------------+ | binary file contents |Unstable | +-----------------------------+-----------------------------+ SEE ALSO
audit(1M), auditd(1M), bsmconv(1M), audit(2), auditon(2), au_to(3BSM), audit_control(4), audit_syslog(5) NOTES
Each token is generally written using the au_to(3BSM) family of function calls. SunOS 5.10 6 Jan 2004 audit.log(4)
All times are GMT -4. The time now is 10:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy