surjyap
September 28th, 2005, 05:30 AM
consider a directory which have a certain criteria. e.g. the directory should contain a certain type of files and it may contain directories also. let say the file types are with extension "*.eof" and "*.neof". So a single directory can contain either eof file or neof file, but not both.
let say in the current directory has sub directories A,B,C and D.
The directory A contains some eof files and directories A1,A2 etc. Now my requirement is to find the directory which contains eof files usnig find command. But find command in nature recursively looks for the files irrespective of length of path.But I want to restrict it. As it will find the directory A contains eof files the find command should not look into subdirectories under the directory A.
In other way I can say that I know the directory which contain eof or neof files. But I don't know which type (either eof or neof) files is contained by the directory. How can I achive it by using find command?
let say in the current directory has sub directories A,B,C and D.
The directory A contains some eof files and directories A1,A2 etc. Now my requirement is to find the directory which contains eof files usnig find command. But find command in nature recursively looks for the files irrespective of length of path.But I want to restrict it. As it will find the directory A contains eof files the find command should not look into subdirectories under the directory A.
In other way I can say that I know the directory which contain eof or neof files. But I don't know which type (either eof or neof) files is contained by the directory. How can I achive it by using find command?