recusion through file system


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers recusion through file system
# 1  
Old 12-04-2001
recusion through file system

is there anyway the following command can be executed recursively throught the whole file system. The command searches for a specific file name and shows a count of how many files there are with that particular name

ls -a | grep -c [filename]
# 2  
Old 12-04-2001
You could do:

ls -lR | grep -c <filename>

But you could do:

find / -name <filename> -print | wc -l

and it will do the same thing. Smilie

fixed html tags --oombera

Last edited by oombera; 02-16-2004 at 11:21 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Cloning a system via mksysb backup from one system and restore to new system

Hello All, I am trying to clone an entire AIX virtual machine to a new virtual machine including all partitions and OS.Can anyone help me on the procedure to follow? I am not really sure on how it can be done.Thanks in advance. Please use CODE tags for sample input, sample output, and for code... (4 Replies)
Discussion started by: gull05
4 Replies

2. Shell Programming and Scripting

UNIX file system to Linux file system migration

We would be migrating UNIX file system to Linux file system. We do have many directory and sub directories with files. after migrating unix to linux file system , i want to make sure all the files has been copied ? What would be the best approach to validate directory ,sub-directory and file... (1 Reply)
Discussion started by: balajikalai
1 Replies

3. HP-UX

how to mount a file system from a solaris server into an hp-ux system

Hi all I wonder if its possible to mount on a hp-ux server a file system that was previously mounted on a solaris 10 server. The LUN is on NetApp stoarge. The problem on hp-ux I cannot do pvcreate on the lun (disk) because contains data. Any help will be appreciated FR (2 Replies)
Discussion started by: fretagi
2 Replies

4. Solaris

"file system is full up to 90% how can i set the file system to 60%"

hi every one "plz any one can give solution to my problem" my problem is my filesystem is full in os level i have to decrease it to 60% how can i? plz help me Thank you for your response (6 Replies)
Discussion started by: sivajerripothul
6 Replies

5. SCO

file system not getting mounted in read write mode after system power failure

After System power get failed File system is not getting mounted in read- write mode (1 Reply)
Discussion started by: gtkpmbpl
1 Replies

6. Solaris

why we need to mount file system other than / file system

Hi, I am new to solaris OS.I have a small question,it might be silly question or good question. My Question is Solaris is following hierarchy type of file structure,means all files are under the root file system.so Once we mount the root file system all sub folders of / ( /usr, /var ,... (7 Replies)
Discussion started by: vr_mari
7 Replies

7. UNIX for Dummies Questions & Answers

How to find a file whick is consuming larger disk space in file system

Hello, Can anybody please tell me the command to find out the filesystem or a file which is consuming larger disk space sing i want to find out the file and want to compress it please help me out any help would be appreciated (6 Replies)
Discussion started by: lokeshpashine
6 Replies

8. Programming

compare XML/flat file with UNIX file system structure

Before i start doing something, I wanted to know whether the approach to compare XML file with UNIX file system structure. I have a pre-configured file(contains a list of paths to executables) and i need to check against the UNIX directory structure. what are the various approches should i use ? I... (6 Replies)
Discussion started by: shafi2all
6 Replies

9. UNIX for Dummies Questions & Answers

how to mount a file system of a remote machine to local file system

Hi friends, In my case, there are serveral PCs running Linux in a LAN. I would like to to mount the directory /A_river of machine-A to the file system of another machine machine-B so that I can access files in that directory. I do not know how to do this. The situation is complicated by... (2 Replies)
Discussion started by: cy163
2 Replies

10. Shell Programming and Scripting

diffrence in non recusion and recursion

Hi, If i have given to write a prog for factorial in C using recursion and without recursion which one is better in what condition and why ? thanks (2 Replies)
Discussion started by: useless79
2 Replies
Login or Register to Ask a Question