Sponsored Content
Top Forums Shell Programming and Scripting Find: ignore directory completely Post 302599969 by nwb123 on Sunday 19th of February 2012 03:58:23 PM
Old 02-19-2012
Find: ignore directory completely

Hello,

I know find can be prevented from recursing into directories with something like the following...

Code:
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 appreciate any help you can give me.

Thanks.

Last edited by methyl; 02-19-2012 at 05:03 PM.. Reason: please use code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to find File copied completely or else ...

In Unix, I am having one file getting copied to some directory. Which command will help me ensure, that file is not completely copied to the disk? (2 Replies)
Discussion started by: videsh77
2 Replies

2. UNIX for Advanced & Expert Users

Using FTP to check whether file is completely FTP... plz find the description below

Hi, We have some clients who will place huge files in to one of the remote server. And the shell script written in our local server to retrieve client files (using FTP) placed on one of the remote server of ours by clients. My question Is there any FTP command/script to check from my local... (1 Reply)
Discussion started by: nmsrao
1 Replies

3. UNIX for Dummies Questions & Answers

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... (0 Replies)
Discussion started by: aquaraider
0 Replies

4. UNIX for Dummies Questions & Answers

How can I use my code to gather information from a file in a completely different directory?

I need my code to compare two different files that are in two completely different directories, How can I do this? So for example, my code will look at file1 which is in my home directory, and compare the files with those from file2 that is in /abc/adf/adr/afc/adf/file2... does that make sense? (1 Reply)
Discussion started by: castrojc
1 Replies

5. 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

6. Shell Programming and Scripting

Wget - how to ignore files in immediate directory?

i am trying to recursively save a remote FTP server but exclude the files immediately under a directory directory1 wget -r -N ftp://user:pass@hostname/directory1 I want to keep these which may have more files under them directory1/dir1/file.jpg directory1/dir2/file.jpg... (16 Replies)
Discussion started by: vanessafan99
16 Replies

7. SCO

Grep to ignore suffix & find end of line

In COBOL, a hyphen can be used in a field name and in a specific program some field names would be identical to others except a suffix was added--sometimes a suffix to a suffix was used. For example, assume I am looking for AAA, AAA-BBB, and AAA-BBB-CCC and don't want to look at AAA-BBB-CCC... (7 Replies)
Discussion started by: wbport
7 Replies

8. 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

9. 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

10. 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
File::Find::Rule::VCS(3pm)				User Contributed Perl Documentation				File::Find::Rule::VCS(3pm)

NAME
File::Find::Rule::VCS - Exclude files/directories for Version Control Systems SYNOPSIS
use File::Find::Rule (); use File::Find::Rule::VCS (); # Find all files smaller than 10k, ignoring version control files my @files = File::Find::Rule->ignore_vcs ->file ->size('<10Ki') ->in( $dir ); DESCRIPTION
Many tools need to be equally useful both on ordinary files, and on code that has been checked out from revision control systems. File::Find::Rule::VCS provides quick and convenient methods to exclude the version control directories of several major Version Control Systems (currently CVS, subversion, and Bazaar). File::Find::Rule::VCS implements methods to ignore the following: CVS Subversion Bazaar In addition, the following version control systems do not create directories in the checkout and do not require the use of any ignore methods SVK Git METHODS
ignore_vcs # Ignore all common version control systems $find->ignore_vcs; # Ignore a specific named version control systems $find->ignore_vcs($name); # Ignore nothing (silent pass-through) $find->ignore_vcs(''); The "ignore_vcs" method excludes the files for a named Version Control System from your File::Find::Rule search. If passed, the name of the version control system is case in-sensitive. Names currently supported are 'cvs', 'svn', 'subversion', 'bzr', and 'bazaar'. As a convenience for high-level APIs, if the VCS name is the defined null string '' then the call will be treated as a nullop. If no params at all are passed, this method will ignore all supported version control systems. If ignoring every version control system, please note that any legitimate directories called "CVS" or files starting with .# will be ignored, which is not always desirable. In widely-distributed code, you instead should try to detect the specific version control system used and call ignore_vcs with the specific name. Passing "undef", or an unsupported name, will throw an exception. ignore_cvs The "ignore_cvs" method excluding all CVS directories from your File::Find::Rule search. It will also exclude all the files left around by CVS after an automated merge that start with '.#' (dot-hash). ignore_rcs The "ignore_rcs" method excluding all RCS directories from your File::Find::Rule search. It will also exclude all the files used by RCS to store the revisions (end with ',v'). ignore_svn The "ignore_svn" method excluding all Subversion (".svn") directories from your File::Find::Rule search. ignore_bzr The "ignore_bzr" method excluding all Bazaar (".bzr") directories from your File::Find::Rule search. ignore_git The "ignore_git" method excluding all Git (".git") directories from your File::Find::Rule search. ignore_hg The "ignore_hg" method excluding all Mercurial/Hg (".hg") directories from your File::Find::Rule search. TO DO
- Add support for other version control systems. - Add other useful VCS-related methods SUPPORT
Bugs should always be submitted via the CPAN bug tracker <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Find-Rule-VCS> For other issues, contact the maintainer AUTHOR
Adam Kennedy <adamk@cpan.org> SEE ALSO
<http://ali.as/>, File::Find::Rule COPYRIGHT
Copyright 2005 - 2010 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.1 2010-10-06 File::Find::Rule::VCS(3pm)
All times are GMT -4. The time now is 11:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy