How do I ignore certain dir while using find? solved.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How do I ignore certain dir while using find? solved.
# 1  
Old 05-21-2009
MySQL How do I ignore certain dir while using find? solved.

Hello everyone, I'm a newbie.
I've got a problem while using find.
I know there is a way to do it in man find which is something like

find . -wholename './src/emacs' -prune -o -print

it works but i also want to use -daystart, -mtime, -type on it and i dont know whats the sequence of these should be.

i've tried like

find . -wholename './src/emacs' -prune -mtime 10 -type f -o -print

but it doesnt work, -mtime and -type doesnt perform anything here.
and im not quite understand whats that -o and -print for in here.

many thanks.

=========================

solved. find . -path './src/emacs' -prune -o -mtime 10 -type f -print
-o is quite important >_<

Last edited by otheus; 05-25-2009 at 06:52 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

AIX find ignore directory

I am using aix. I would like to ignore the /u directory. I tried this but it is not working. find / -type f -type d \( -path /u \) -prune -o -name '*rpm*' 2>/dev/null /u/appx/ls.rpm /u/arch/vim.rpm (4 Replies)
Discussion started by: cokedude
4 Replies

2. Shell Programming and Scripting

Ignore .txt in find script

Hi i am really new to linux scripting and i need a little bit help. i have the following script: find "/usr/share/nextcloud/data/__groupfolders" -type f -mtime +14 -exec rm {} \; but i don't want to delete everything. I want to ignore .txt files. How can i do this? (3 Replies)
Discussion started by: Frederic
3 Replies

3. UNIX for Beginners Questions & Answers

Find command with Ignore Access issues

Hi, I am using following command to find a specific file. find . -name "find*.txt" -type f -print I am issuing that command at root directory since I don't know in which sub folder that file is getting created from some other process. As I am not having access to all directories, my... (3 Replies)
Discussion started by: RameshCh
3 Replies

4. Shell Programming and Scripting

Find command with ignore directory

Dear All, I am using find command find /my_rep/*/RKYPROOF/*/*/WDM/HOME_INT/PWD_DATA -name rk*myguidelines*.pdf -print The problem i am facing here is find /my_rep/*/ the directory after my_rep could be mice001, mice002 and mice001_PO, mice002_PO i want to ignore mice***_PO directory... (3 Replies)
Discussion started by: yadavricky
3 Replies

5. HP-UX

[Solved] Unable to change/create home dir for particular user

Hi all I wanted to change the home dir for a user, but when using smh : SMH->Accounts for Users and Groups->Local Users->Modify User ---------------------------------------------------------------------------------------------------------------------------------------------- * Required... (8 Replies)
Discussion started by: fretagi
8 Replies

6. Shell Programming and Scripting

Find: ignore directory completely

Hello, I know find can be prevented from recursing into directories with something like the following... find . -name .svn -prune -a type d But how can I completely prevent directories of a certain name (.svn) from being displayed at all, the top level and the children? I really... (2 Replies)
Discussion started by: nwb123
2 Replies

7. Shell Programming and Scripting

KSH - Find paths of multiple files in CC (dir and sub-dir))

Dear Members, I have a list of xml files like abc.xml.table prq.xml.table ... .. . in a txt file. Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file. Please help me with the script or command to do so. ... (11 Replies)
Discussion started by: Yoodit
11 Replies

8. Shell Programming and Scripting

what is the find command to find exact dir from the root

I want to find a dir called STOP from the root.so what is the find command. Thanks & Regards Rajkumar (1 Reply)
Discussion started by: rajkumar_g
1 Replies

9. Shell Programming and Scripting

A script to find dir, delete files in, and then del dir?

Hello!! I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory: drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies

10. Programming

To find a existence of a dir within a dir

Hi, I want to find whether a dir "temp" is present inside a dir. It should get a dir a input and search recursively within that directory to check whether temp is present and return 1 or return 0 if it is not present anywhere inside the directory/sub-directory. I know we can use readdir in the... (1 Reply)
Discussion started by: spsenthil
1 Replies
Login or Register to Ask a Question
Graph::UnionFind(3pm)					User Contributed Perl Documentation				     Graph::UnionFind(3pm)

NAME
Graph::UnionFind - union-find data structures SYNOPSIS
use Graph::UnionFind; my $uf = Graph::UnionFind->new; # Add the vertices to the data structure. $uf->add($u); $uf->add($v); # Join the partitions of the vertices. $uf->union( $u, $v ); # Find the partitions the vertices belong to # in the union-find data structure. If they # are equal, they are in the same partition. # If the vertex has not been seen, # undef is returned. my $pu = $uf->find( $u ); my $pv = $uf->find( $v ); $uf->same($u, $v) # Equal to $pu eq $pv. # Has the union-find seen this vertex? $uf->has( $v ) DESCRIPTION
Union-find is a special data structure that can be used to track the partitioning of a set into subsets (a problem known also as disjoint sets). Graph::UnionFind() is used for Graph::connected_components(), Graph::connected_component(), and Graph::same_connected_components() if you specify a true "union_find" parameter when you create an undirected graph. Note that union-find is one way: you cannot (easily) 'ununion' vertices once you have 'unioned' them. This means that if you delete edges from a "union_find" graph, you will get wrong results from the Graph::connected_components(), Graph::connected_component(), and Graph::same_connected_components(). API add $uf->add($v) Add the vertex v to the union-find. union $uf->union($u, $v) Add the edge u-v to the union-find. Also implicitly adds the vertices. has $uf->has($v) Return true if the vertex v has been added to the union-find, false otherwise. find $uf->find($v) Return the union-find partition the vertex v belongs to, or "undef" if it has not been added. new $uf = Graph::UnionFind->new() The constructor. same $uf->same($u, $v) Return true of the vertices belong to the same union-find partition the vertex v belongs to, false otherwise. AUTHOR AND COPYRIGHT
Jarkko Hietaniemi jhi@iki.fi LICENSE
This module is licensed under the same terms as Perl itself. perl v5.10.0 2008-11-27 Graph::UnionFind(3pm)