1

MariaDB is installed on a remote CentOS 7 server. How can I find the location of the nearest equivalent to mysql-connector-java-5.0.8.jar in the server's file system?

grep seems to only search file contents. The find examples I have researched have to do more with exact file names or owner names or file extensions. I want to find files that might have something like mysql-connector-java in their names.

2 Answers 2

2
find / -mount -name '*mysql-connector-java*' -print 

the -mount predicate is so that find skips searching virtual filesystems like /proc and /sys (useless to search) and other things that might be mounted like network-mounted filesystems (which could make it really slow!), but you can omit it if you want to search absolutely everything.

0

Most systems have a locate database which is updated every night. This does a find over the whole system and stores the result in an optimized database.

In this case locate mysql-connector-java should have given an answer quicker than the find solution.

Note that locate will only show files that are findable by every user, so files in protected directories won't be shown.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.