 Often we want to search for files. That is somewhere on my hard drive. There's a file that I'm looking for I know the name or the the the the structure of the name. There are different ways to locate files. One is using locate Locate followed by a file name Maybe Wireshark. I know there should be some files about Wireshark. Wireshark is installed Locate may tell me about those And it tells me all the files That have the name Wireshark in it and you you can scroll up and down I will not but it returns a whole set of files the complete path The subdirectory and the file name that refers to Wireshark. So locate Okay, if there's no file then it will return nothing there Locate I Had X what what ITS 352 locate xyz.doc This is interesting I Have a Directory called ITS 352 and I have inside that I have a file called xyz.doc if I try to locate xyz.doc It doesn't return an answer Locate is a very Locate uses a database of files to find the answer It's very fast to find the answer But the way that it works is that maybe the past hour or so the operating system has done a search for all the files and put Them in a database But it's not up to date Recently I've created xyz.doc If I try to locate it, it's not currently in the database So locate cannot find that So locate is very quick, but doesn't cover all the files So a more Powerful command to find files is using find It's more powerful, but slightly more complex Find the pattern will use find Specify the directory we want to search in and then the option dash name because we want to find based upon the name star.doc so there's three arguments to this fine command the Directory I want to search in Including the sub directories Then I say I want to search based upon the file name because actually you can search on other criteria file size creation date permissions and I want to find anything that ends with a dot doc and that finds xyz.doc So it does an actual search If I want to search for my current directory It's good practice to include the double quotes Especially when you use a wild card there the star character find searching through my current directory Files with name the end with dot PDF And it shows me all the PDF files What if I want to find all the PDF files on the hard disk? find slash dash name star dot PDF That is search from the root directory and end including all sub directories and You say it may see many results. You may also see some errors permission denied errors So it's searched through the entire hard disk Returns all the PDFs But some directories the student user is not allowed to access to do the search through so you'll often see permission denied in there But many results We can locate files Although it doesn't get the most recent files more powerfully. We can find files. You think the command find The last way that we've commonly used to search for files Is to search for application files or executables Before we search for why shark and it returned many directories files related to why shark But I want to find where is the application why shark? So there must be a program an executable on my computer that is why shark we can use which It's in slash user slash bin LS is also an application. It's in slash bin Nano is an application So these are the executables the things that are executed when we type the command. It's in slash user slash bin Then is short for binary and it's usually It really means the application the program the executable Which searches for programs locate and find search for any type of files