Will find files that do have 'domain' in the filename, and will find files that don't have 'domain' in the filename, but exist in a directory with 'domain' in the dirname.
You shouldn't need to search for "subdomain/sub domain", "free domain". etc. because the original search for 'domain' will find them all.
I have files on /path/to/directories having contents on lists of websites offering free domain and subdomain. I also have files having contents about registration to some websites.
I tried
find /path/to/directories -type f -exec grep -l "domain" {} \;
There are lot of files generated including .js/html/htm etc. Those files which I want to find are in .txt and .doc format. I think it would be better to narrow down the search. I have permission reading those directories. Besides I also tried the command with "sudo" added.
The command works. However it generates lot of files.
Years ago, I registered several subdomains with some websites. Because of inactive I suppos they have been deleted. I need to re-register them. Unfortunately I can't recall those websites nor the name of the company. What I can remember is all subdomain starting with "satimis" e.g. satimis.aaa.com or satimis.bbb.net or satimis.ccc.org etc. If I expect to narrow down the searching please advise what shall I add to your command. Thanks
At the beginning of your command. Because some files may be owned by root.