Sponsored Content
Full Discussion: counting files
Top Forums UNIX for Dummies Questions & Answers counting files Post 3276 by Edy on Thursday 28th of June 2001 05:34:28 AM
Old 06-28-2001
Question counting files

Which one line command can count and print to the screen the number of files containing "a" or "A" in their name
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Counting Occurances in Two Files

I have two files I want to compare, one is a list of variables and the other is a text file COBOL program. Basically what I want to do is display only those variables that appear in the COBOL program only once. However I would also accept a count of each variable as it appears in the COBOL... (2 Replies)
Discussion started by: Keith Gergel
2 Replies

2. UNIX for Dummies Questions & Answers

Counting lines and files

Hi experts, First of all thanks for all your help. How can i count the lines within a text file and send this number to another text file? And by the way how can i count the number of files inside a tape ("/dev/rtp") that as one pattern (Ex. "/CTA/") and send this number to a text file? I... (6 Replies)
Discussion started by: jorge.ferreira
6 Replies

3. Shell Programming and Scripting

Help with counting files please

Hi all. If I have a unix directory with multiple files, lets say, I have some with .dat extensions, some with .txt extensions, etc etc. How in a script would I provide a count of all the different file types (so, the different extensions, I guess) in the directory?? So if I had: test.dat... (6 Replies)
Discussion started by: gerard1
6 Replies

4. Solaris

Counting up files

Hi, I have a load of if statements that look for files in a directory, I want to be able to count them up and the total files confirmed in an email? I ahve tried expr but i this does not work and it only reads in the first if and ignores the rest. Please see script, #!/bin/ksh ... (2 Replies)
Discussion started by: Pablo_beezo
2 Replies

5. UNIX for Dummies Questions & Answers

Counting rows in many files

I'm regularly counting the number of rows in a number of files. I need to know how many rows their are in all files together. Counting rows in one file I can handle, but how do I count rows in all at once? I'd be grateful for any answer. (7 Replies)
Discussion started by: DrZoidberg
7 Replies

6. Shell Programming and Scripting

counting prefixes of files

Hello, at the moment I'm on with programming some kind of version history script for network devices. The configration files are uploaded in the form: devicename-confg_date_time. For keeping the last 10 configurations I want to split the devicename from the rest. This works well with... (5 Replies)
Discussion started by: Sally[-_-]
5 Replies

7. Shell Programming and Scripting

multiple files: counting

In a directory, I have 5000 multiple files that contains around 4000 rows with 10 columns in each file containing a unique string 'AT' located at 4th column. OM 3328 O BT 268 5.800 7.500 4.700 0.000 1.400 OM 3329 O BT 723 8.500 8.900... (7 Replies)
Discussion started by: asanjuan
7 Replies

8. Shell Programming and Scripting

Counting Files

In a script, how would I go about finding the number of files for the first parameter after my script name? For instance, my script name is myscript.sh and the folder I am checking is not the current working directory, lets say it's folder1. so I type myscript.sh folder1 This script below... (2 Replies)
Discussion started by: Confirmed104
2 Replies

9. UNIX for Dummies Questions & Answers

Counting files without ls or wc

i need to write a shell script to "count the number of files in the current directory but without using either ls or wc command"..... please help! (1 Reply)
Discussion started by: lexicon
1 Replies
TAU_REDUCE(1)							       Tools							     TAU_REDUCE(1)

NAME
tau_reduce - generates selective instrumentation rules based on profile data SYNOPSIS
tau_reduce {-f filename} [-n] [-r filename] [-o filename] [-v] [-p] DESCRIPTION
tau_reduce is an application that will apply a set of user-defined rules to a pprof dump file (pprof -d) in order to create a select file that will include an exclude list for selective implementation for TAU. The user must specify the name of the pprof dump file that this application will use. This is done with the -f filename flag. If no rule file is specified, then a single default rule will be applied to the file. This rule is: numcalls > 1000000 & usecs/call < 2, which will exclude all routines that are called at least 1,000,000 times and average less then two microseconds per call. If a rule file is specified, then this rule is not applied. If no output file is specified, then the results will be printed out to the screen. RULES
Users can specify a set of rules for tau_reduce to apply. The rules should be specified in a separate file, one rule per line, and the file name should be specifed with the appropriate option on the command line. The grammar for a rule is: [GROUPNAME:]FIELD OPERATOR NUMBER. The GROUPNAME followed by the colon (:) is optional. If included, the rule will only be applied to routines that are a member of the group specified. Only one group name can be applied to each rule, and a rule must follow a groupname. If only a groupname is given, then an unrecognized field error will be returned. If the desired effect is to exclude all routines that belong to a certain group, then a trivial rule, such as GROUP:numcalls > -1 may be applied. If a groupnameis given, but the data does not contain any groupname data, then then an error message will be given, but the rule will still be applied to the date ignoring the groupname specification. A FIELD is any of the routine attributes listed in the following table: ATTRIBUTE NAME MEANING numcalls Number of times the routine is called numsubrs Number of subroutines that the routine contains percent Percent of total implementation time usec Exclusive routine running time, in microseconds cumusec Inclusive routine running time, in microseconds count Exclusive hardware count totalcount Inclusive hardware count stddev Standard deviation usecs/call Microseconds per call counts/call Hardware counts per call Some FIELDS are only available for certain files. If hardware counters are used, then usec, cumusec, usecs/per call are not applicable and a error is reported. The opposite is true if timing data is used rather than hardware counters. Also, stddev is only available for certain files that contain that data. An OPERATOR is any of the following: < (less than), > (greater than), or = (equals). A NUMBER is any number. A compound rule may be formed by using the & (and) symbol in between two simple rules. There is no "OR" because there is an implied or between two separate simple rules, each on a separate line. (ie the compound rule usec < 1000 OR numcalls = 1 is the same as the two simple rules "usec < 1000" and "numcalls = 1"). RULE EXAMPLES
#exclude all routines that are members of TAU_USER and have less than #1000 microseconds TAU_USER:usec < 1000 #exclude all routines that have less than 1000 microseconds and are #called only once. usec < 1000 & numcalls = 1 #exclude all routines that have less than 1000 usecs per call OR have a percent #less than 5 usecs/call < 1000 percent < 5 NOTE: Any line in the rule file that begins with a # is a comment line. For clarity, blank lines may be inserted in between rules and will also be ignored. OPTIONS
-f filename specify filename of pprof dump file -p print out all functions with their attributes -o filename specify filename for select file output (default: print to screen -r filename specify filename for rule file -v verbose mode (for each rule, print out rule and all functions that it excludes) EXAMPLES
To print to the screen the selective instrumentation list for the paraprof dump file app.prf with default selection rules use: tau_reduce -f app.prf To create a selection file, app.sel, from the paraprof dump file app.prf using rules specified in foo.rlf use: tau_reduce -f app.prf -r foo.rlf -o app.sel SEE ALSO
12/22/2005 TAU_REDUCE(1)
All times are GMT -4. The time now is 03:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy