Thanks for your valuable inputs. Will try it out and let you know asap.. But i have a doubt on the command
tee means creation of file. Could you please explain me that statement alone. So that it would be useful for me to understand the concept...
Thanks for your valuable inputs. Will try it out and let you know asap.. But i have a doubt on the command
tee means creation of file. Could you please explain me that statement alone. So that it would be useful for me to understand the concept...
The tee utility does not "mean creation of file". The tee utility copies data read from its standard input to its standard output and also makes a copy of everything read from its standard input in all of the files named as operands. The special file /dev/tty is the process' controlling terminal. If you want to redirect the output of your this pipeline to a file, the command line would be:
If you want long listing output (instead of just the file names), the command line would be:
By default, the tee utility empties the files named by its operands before copying data to them; this doesn't matter for /dev/tty. If you want to save the output to a regular file and you want to append the data to the file instead of replacing data in the file, use: ls -l | grep -v '^total' | tee -afile | wc -l >> file
Note that the total line in ls -l output is not the number of files in the directory; it the the number of disk blocks consumed by files in the directory. So, if you want long listing output, the grep -v gets rid of that total line, the tee command copies the remaining ls -l output to your destination file and also copies it to its standard output so wc -l can count the number of lines the ls command printed and adds that output to the end of the output written by the tee command.
Trying to count total files with different file types with thousands of files in each folder.
Since some files do not have extensions I have to use below criteria.
Count Total Files starting with --> "^ERROR"
Count Total Files starting with --> "^Runtime"
Count Everything else or files... (3 Replies)
Hello Friends,
I've been trying to calculate total number of a certain match in multiple data records files (DRs).
Let say I have a daily created folders for each day since the beginning of july like the following
drwxrwxrwx 2 mmsuper med 65536 Jul 1 23:59 20150701
drwxrwxrwx 2 mmsuper... (1 Reply)
Hello people,
On HP-UX B.11.11 U 9000/800
How can I have in aprox. the total number of files in a specific FS?
Is the number of used inodes a rough estimation of my total number of files?
Server1 /Data:df -i .
/Data (/dev/vg_Data/lvol1 ) : 18292960 total i-nodes
15800945 free... (3 Replies)
I'm trying to make this code below to work but I can't find the way to do the following: I want to make the script to touch only 10% of the total amount of files counted inside the given directory instead of all like it is now.
I would greatly appreciate it if someone can give me a direction on... (9 Replies)
Hello Friends,
I know you all are busy and inteligent too...
I am stuck with one small issue if you can help me then it will be really great.
My problem is I am having some files i.e.
Input.txt1
Input.txt2
Input.txt3
Now my task is I need to check the total number of rows in... (4 Replies)
Hi all...
I have a directory called dbrn. This directory contains an unknown number of subdirectories which in turn contain an unknown number of files.
What I want to know is:
How many files with extention .ABC can be found in /dbrn across all subdirecties, and what is the total size for... (9 Replies)
how to count the total number of lines of all the files under a directory using perl script..
I mean if I have 10 files under a directory then I want to count the total number of lines of all the 10 files contain. Please help me in writing a perl script on this. (5 Replies)
Hi all,
I have copied all my files to one folder.and i want to check how many files (count) in the folder recently moved or total files in my folder?
please send me the query asap. (3 Replies)
I am getting the list of all the files which have "aaa" from files whose name is File*_bbb*.
grep -l "aaa" File*_bbb*
But I want to count the number of files. That is I want the total number of files which have "aaa" in
files File*_bbb*
If I run the following for getting number of... (1 Reply)
I am using CVSWeb on HPUnix.
When i access it, all directories are listed but files are not listed.
I am getting the error "NOTE: There are 51 files, but none matches the current tag. "
in tomcat sevrer log i am getting the message "rlog warning: Missing revision or branch number after -r"... (0 Replies)