07-10-2008
find command to exclude directories
Howdy
I have this directory structure ...
eep
eepaptest
eepfatest
eepgltest
eep.old
eeppoptest
ehf
ehfaptest
ehfgltest
ehp
ehpgltest
I want to find files in these directories, but I want to exclude eep, ehf & ehp.
Cany anyone help with the correct command ??
Thanks in advance !
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have a line in my script to find the files changed in the last 24 hours. It is as below:
find /home/hary -type f -mtime -1
I now want to exclude a directory named "/home/hary/temp/cache" from the above find command. How do I add it to my script?
Any help is appreciated.
... (9 Replies)
Discussion started by: tadi18
9 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Can some one help me how to exclude multiple directories using find command..
I have the directory structure below.
/a/a1/b1
/a/c1/c2
/a/d1/d2/d3
I want to exlcude a1,c2and d3 from the above using find,can some one suggest pls..
thanks in advance...
Use code tags... (1 Reply)
Discussion started by: jagadish_gaddam
1 Replies
3. Shell Programming and Scripting
Hi Forum.
I'm trying to write a script that finds and deletes files that are older than 300 days. The script will read a table that contains the following 3 columns:
1st col: “Y” means sub-directory scan; "N" means no subdirectory scan
2nd col: sub-directory location
3rd col: File prefix... (7 Replies)
Discussion started by: pchang
7 Replies
4. Shell Programming and Scripting
Hi,
I use find command to list all the files in a directory and its sub-directories, but the problem is to exclude certain directories during search. Can i give the directory names in command line to skip them and search rest of the directories?
For example i have directories:
test
../test1... (1 Reply)
Discussion started by: nmattam
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Firstly - sorry for the duplicate my other post looked like i was posting a how to for people. But i am wanting some help :P
I want to search from / to find files and exclude my mounted ntfs drives.
I have found this thread (Which I can't post the URL to until i have 5 posts) it's... (4 Replies)
Discussion started by: mightymouse2045
4 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
Using grep command, i want to find the pattern of text in all directories and sub-directories.
e.g: if i want to search for a pattern named "parmeter", i used the command
grep -i "param" ../*
is this correct? (1 Reply)
Discussion started by: vinothrajan55
1 Replies
7. AIX
Hi, im having some issues after i execute the next command:
tar -cvf /varios/restore/test.tar -X /jfma/test1/excludefile /jfma | gzip -c > /varios/restore/test.tar.gz
this creates the desired "test.tar.gz" file, but whe i try to open it it says "tar: 0511-164 There is a media read or write... (6 Replies)
Discussion started by: blacksteel1988
6 Replies
8. Shell Programming and Scripting
Can you please help tweak the below command to exclude all directories with the name "logs" and "tmp"
find . -type f \( ! -name "*.tar*" ! -name "*.bkp*" \) -exec /usr/xpg4/bin/grep -i "user_1" /dev/null {} + >result.out
bash-3.2$ uname -a
SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v... (9 Replies)
Discussion started by: mohtashims
9 Replies
9. Shell Programming and Scripting
Hi,
uname -a
SunOS mymac 5.11 11.2 sun4u sparc SUNW,SPARC-Enterprise
I need to tar a folder /tmp/moht but do not want these three folders to be included in the tar file -> savejpg, bmpsave and imgsave
I tried --exclude, -path, -not options but it says bad option
Can you help me with... (3 Replies)
Discussion started by: mohtashims
3 Replies
LEARN ABOUT NETBSD
dh_installexamples
DH_INSTALLEXAMPLES(1) Debhelper DH_INSTALLEXAMPLES(1)
NAME
dh_installexamples - install example files into package build directories
SYNOPSIS
dh_installexamples [debhelperoptions] [-A] [-Xitem] [file...]
DESCRIPTION
dh_installexamples is a debhelper program that is responsible for installing examples into usr/share/doc/package/examples in package build
directories.
From debhelper compatibility level 11 on, dh_install will fall back to looking in debian/tmp for files, if it does not find them in the
current directory (or wherever you've told it to look using --sourcedir).
FILES
debian/package.examples
Lists example files or directories to be installed.
OPTIONS
-A, --all
Install any files specified by command line parameters in ALL packages acted on.
--sourcedir=dir
Look in the specified directory for files to be installed. This option requires compat 11 or later (it is silently ignored in compat
10 or earlier).
Note that this is not the same as the --sourcedirectory option used by the dh_auto_* commands. You rarely need to use this option,
since dh_installexamples automatically looks for files in debian/tmp in debhelper compatibility level 11 and above.
--doc-main-package=main-package
Set the main package for a documentation package. This is used to install the documentation of the documentation package in
/usr/share/doc/main-package as recommended by the Debian policy manual 3.9.7 in S12.3.
In compat 11 (or later), this option is only useful if debhelper's auto-detection of the main package is wrong. The option can also be
used to silence a warning from debhelper when the auto-detection fails but the default happens to be correct.
This option cannot be used when dh_installexamples is instructed to act on multiple packages. If you need this option, you will
generally need to combine it with -p to ensure exactly one package is acted on.
-Xitem, --exclude=item
Exclude files that contain item anywhere in their filename from being installed.
file ...
Install these files (or directories) as examples into the first package acted on. (Or into all packages if -A is specified.)
NOTES
Note that dh_installexamples will happily copy entire directory hierarchies if you ask it to (similar to cp -a). If it is asked to install
a directory, it will install the complete contents of the directory.
SEE ALSO
debhelper(7)
This program is a part of debhelper.
AUTHOR
Joey Hess <joeyh@debian.org>
11.1.6ubuntu2 2018-05-10 DH_INSTALLEXAMPLES(1)