0
votes
2answers
40 views

find: show directories which contain certain subdirectories

I have a list of directories /u2/tip/coy/inter/fcs/ /u2/tip/coy/inter/fcs/devel /u2/tip/coy/inter/fcs/ecom_flink /u2/tip/coy/inter/fcs/totalstable /u2/tip/coy/inter/fcs/develbi ...
1
vote
3answers
163 views

Permanently set `find` regextype

GNU find allows the use of different regex formats via the -regextype option, but as far as I can tell I have to type out -regextype <whatever> every single time which is onerous. If one wants ...
1
vote
2answers
3k views

Match regex pattern only in filename.extension

I need to use find to locate a file matching a regex pattern in filename.extension instead of the default, which matches /path/to/filename.extension. For instance: /folder |--a-love-song.ogg ...
0
votes
1answer
161 views

GNU find .extension files and -exec, while new .extension files are being made

Here is a problem, can someone please explain or provide some references. I've been trying to read since an hour but can not find the answer. Suppose, I have process1 going on a pool of directories. ...
1
vote
2answers
1k views

GNU find: Disable the error when 'find' finds no matches

I've got a setup where I need to use 'find' to find 0 or more files in a certain directory, however, 'find' always produces an error when there are no files that match a certain check. Is it possible ...
3
votes
2answers
508 views

Difference between find -name with and w/o quotes?

I was going to file a bug to findutils on gnu.org when I saw a notice that asked me whether I knew the difference between these two commands: find -name *.c and find -name "*.c" I use find ...
3
votes
4answers
2k views

GNU find with -exec rm removes matches, then complains they don't exist

I have a /domains directory in which I have entries such as theawesomesite.com 0.2.v.theawesomesite.com 0.3.v.theawesomesite.com And after testing 0.3, I'll set the main domain to alias the new ...
7
votes
4answers
8k views

find: -exec vs xargs (aka Why does “find | xargs basename” break?)

I was trying to find all files of a certain type spread out in subdirectories, and for my purposes I only needed the filename. I tried stripping out the path component via basename, but it did't work ...
9
votes
2answers
10k views

How to Combine find and grep for a complex search? ( GNU/linux, find, grep )

I'm trying to do a text search in some files that share a similar directory structure, but are not in the same directory tree, in GNU/Linux. I have a web server with many sites that share the same ...