Sponsored Content
Full Discussion: AIX find ignore directory
Top Forums UNIX for Advanced & Expert Users AIX find ignore directory Post 303039681 by cokedude on Friday 11th of October 2019 05:12:57 PM
Old 10-11-2019
Quote:
Originally Posted by MadeInGermany
Doesn't it make more sense to have the -type f right from the -o?
Also, if -prune is true then it is printed, unless there is an action like -print or -exec on the other branch.
Code:
find / -path /u -prune -o -type f -name '*rpm*' -print

What about if you are trying to ignore multiple directories? I was trying to follow this example. I want to search for "*rpm*" in addition to what this example has.

Code:
find . -type d \( -path dir1 -o -path dir2 -o -path dir3 \) -prune -o -print

linux - How to exclude a directory in find . command - Stack Overflow
 

10 More Discussions You Might Find Interesting

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

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

3. Shell Programming and Scripting

Find specific files only in current directory...not sub directories AIX

Hi, I have to find specific files only in the current directory...not in the sub directories. But when I use Find command ... it searches all the files in the current directory as well as in the subdirectories. I am using AIX-UNIX machine.Please help.. I am using the below command. And i am... (2 Replies)
Discussion started by: aakishore
2 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. 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

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

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

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

9. Shell Programming and Scripting

Script using awk to find and replace a line, how to ignore comment lines

Hello, I have some code that works more or less. This is called by a make file to adjust some hard-coded definitions in the src code. The script generated some values by looking at some of the src files and then writes those values to specific locations in other files. The awk code is used to... (3 Replies)
Discussion started by: LMHmedchem
3 Replies

10. AIX

Samba 3.6 on AIX 7.1 - Windows 10 Access to AIX file shares using Active Directory authentication

I am running AIX 7.1 and currently we have samba 3.6.25 installed on the server. As it stands some AIX folders are shared that can be accessed by certain Windows users. The problem is that since Windows 10 the guest feature no longer works so users have to manually type in their Windows login/pwd... (14 Replies)
Discussion started by: linuxsnake
14 Replies
createrepo(8)															     createrepo(8)

NAME
createrepo - Create repomd (xml-rpm-metadata) repository SYNOPSIS
createrepo [options] <directory> DESCRIPTION
createrepo is a program that creates a repomd (xml-based rpm metadata) repository from a set of rpms. OPTIONS
-u --baseurl <url> Optional base url location for all files. (not used by any clients at this time) -o --outputdir <url> Optional output directory (useful for read only media). -x --exclude <package> File globs to exclude, can be specified multiple times. -i --pkglist <filename> specify a text file which contains the complete list of files to include in the repository from the set found in the directory. File format is one package per line, no wildcards or globs. -q --quiet Run quietly. -g --groupfile <groupfile> A precreated xml filename to point to for group information. See examples section below for further explanation. -v --verbose Run verbosely. -c --cachedir <path> Specify a directory to use as a cachedir. This allows createrepo to create a cache of checksums of packages in the repository. In consecutive runs of createrepo over the same repository of files that do not have a complete change out of all packages this decreases the processing time dramatically. --update If metadata already exists in the outputdir and an rpm is unchanged (based on file size and mtime) since the metadata was generated, reuse the existing metadata rather than recalculating it. In the case of a large repository with only a few new or modified rpms this can significantly reduce I/O and processing time. -C --checkts Don't generate repo metadata, if their timestamps are newer than its rpms. This option decreases the processing time drastically again, if you happen to run it on an unmodified repo, but it is (currently) mutual exclusive with the --split option. --split Run in split media mode. Rather than pass a single directory, take a set of directories corresponding to different volumes in a media set. -p --pretty Output xml files in pretty format. -V --version Output version. -h --help Show help menu. -d --database Generate sqlite databases for use with yum. EXAMPLES
Here is an example of a repository with a groups file. Note that the groups file should be in the same directory as the rpm packages (i.e. /path/to/rpms/comps.xml). createrepo -g comps.xml /path/to/rpms FILES
repodata/filelists.xml.gz repodata/other.xml.gz repodata/primary.xml.gz repodata/repomd.xml SEE ALSO
yum (8) yum.conf (5) AUTHORS
Seth Vidal <skvidal@phy.duke.edu> BUGS
Any bugs which are found should be emailed to the mailing list: rpm-metadata@linux.duke.edu Seth Vidal 2005 Jan 2 createrepo(8)
All times are GMT -4. The time now is 02:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy