01-09-2008
Thanks both of you. Both answers proved to be very useful. I now have a much better understanding of find and wc. also, I now feel very confident about the pipe key, whereas before I was somewhat unsure about it. thanks again.
-Kevin
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there,
I'd like to find a way to display a string and count the words in it.
supernova:~# echo 'hello world' | tee - | wc
Unfortunately, this doesn't work.
Any idea?
Thanks in advance.
Santiago (15 Replies)
Discussion started by: chebarbudo
15 Replies
2. Shell Programming and Scripting
Hi Mates,
I require help in the following:
I have the following file snmp.txt
Wed Mar 2 16:02:39 SGT 2011
Class : mmTrapBladeS
origin : 10.0.0.0
hostname : 10.0.0.2
msg : IBM Blade Alert:
Calendar Index : 10.0.0.2-IBMBLADE
Fri Mar 4 07:10:54 SGT 2011
Class : mmTrapBladeS... (2 Replies)
Discussion started by: dbashyam
2 Replies
3. UNIX for Dummies Questions & Answers
Hello everyone,
I am new to Unix and I am stuck with a problem. I need only a single command to display the output of who and then add the total number of users and display at the bottom of that output.
Example-: (Expected output)
sreyan@debian:~$ <command>
sreyan tty7 ... (7 Replies)
Discussion started by: sreyan32
7 Replies
4. Shell Programming and Scripting
I want to basically do the below thing. Suppose there is a tag called object1. I want to display an output for all similar tag values under heading of Object 1 and the count of the xmls. Please help
File:
<xml><object1>house</object1><object2>child</object2>... (9 Replies)
Discussion started by: srkmish
9 Replies
5. Programming
Hi,
I have been frantically googling and checking some sqlplus forums, but can't find the correct syntax.
Basically within sqlplus I want to do a count on a table and if the count is 0 it displays 0 instead of "no rows found".
For eample:
select count(*) from tableA where... (3 Replies)
Discussion started by: chris01010
3 Replies
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
Hi All,
hope you all are doing well!
I kindly ask you for shell scripting help, here is the description:
I have huge number of files shown below on date wise, which contains different strings(numbers you can say) including 505001 and 602001.
... (14 Replies)
Discussion started by: VasuKukkapalli
14 Replies
8. Shell Programming and Scripting
Hello Friends,
Can somebody assist an issue I am having? I have a separate file with a list of account ids
XXX200B02Y01
XXX200B03Y01
XXX200B05Y01
XXX200B07Y01
XXX200B08Y01
I call the file, and run an egrep against a directory and logfiles
AccountID=$(cat... (2 Replies)
Discussion started by: liketheshell
2 Replies
9. UNIX for Beginners Questions & Answers
Hi,
I have a file with a list of bunch of IP addresses from different VLAN's . I am trying to find the list the number of each vlan occurence in the output
Here is how my file looks like
1.1.1.1
1.1.1.2
1.1.1.3
1.1.2.1
1.1.2.2
1.1.3.1
1.1.3.2
1.1.3.3
1.1.3.4
So what I am trying... (2 Replies)
Discussion started by: new2prog
2 Replies
DU(1) BSD General Commands Manual DU(1)
NAME
du -- display disk usage statistics
SYNOPSIS
du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k | -m | -g] [-x] [-I mask] [file ...]
DESCRIPTION
The du utility displays the file system block usage for each file argument and for each directory in the file hierarchy rooted in each direc-
tory argument. If no file is specified, the block usage of the hierarchy rooted in the current directory is displayed.
The options are as follows:
-a Display an entry for each file in a file hierarchy.
-c Display a grand total.
-d depth
Display an entry for all files and directories depth directories deep.
-H Symbolic links on the command line are followed, symbolic links in file hierarchies are not followed.
-h "Human-readable" output. Use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte.
-I mask
Ignore files and directories matching the specified mask.
-g Display block counts in 1073741824-byte (1-Gbyte) blocks.
-k Display block counts in 1024-byte (1-Kbyte) blocks.
-L Symbolic links on the command line and in file hierarchies are followed.
-m Display block counts in 1048576-byte (1-Mbyte) blocks.
-P No symbolic links are followed. This is the default.
-r Generate messages about directories that cannot be read, files that cannot be opened, and so on. This is the default case. This
option exists solely for conformance with X/Open Portability Guide Issue 4 (``XPG4'').
-s Display an entry for each specified file. (Equivalent to -d 0)
-x File system mount points are not traversed.
The du utility counts the storage used by symbolic links and not the files they reference unless the -H or -L option is specified. If either
the -H or -L options are specified, storage used by any symbolic links which are followed is not counted or displayed. If more than one of
the -H, -L, and -P options is specified, the last one given is used.
Files having multiple hard links are counted (and displayed) a single time per du execution. Directories having multiple hard links (typi-
cally Time Machine backups) are counted a single time per du execution.
ENVIRONMENT
BLOCKSIZE If the environment variable BLOCKSIZE is set, and the -k option is not specified, the block counts will be displayed in units of
that size block. If BLOCKSIZE is not set, and the -k option is not specified, the block counts will be displayed in 512-byte
blocks.
LEGACY DESCRIPTION
In legacy mode, only one of the -H, -L, or -P options may be specified.
The command will detect and report a SYMLOOP error (loop involving symbolic links). In legacy mode, this is not the case.
For more information about legacy mode, see compat(5).
SEE ALSO
df(1), fts(3), compat(5), symlink(7), quot(8)
HISTORY
A du command appeared in Version 1 AT&T UNIX.
BSD
June 2, 2004 BSD