securitybreach Posted March 13, 2017 Share Posted March 13, 2017 It goes without saying that every good Linux desktop environment offers the ability to search your file system for files and folders. If your default desktop doesn’t -- because this is Linux -- you can always install an app to make searching your directory hierarchy a breeze. But what about the command line? If you happen to frequently work in the command line or you administer GUI-less Linux servers, where do you turn when you need to locate a file? Fortunately, Linux has exactly what you need to locate the files in question, built right into the system. The command in question is find. To make the understanding of this command even more enticing, once you know it, you can start working it into your Bash scripts. That’s not only convenience, that’s power. Let’s get up to speed with the find command so you can take control of locating files on your Linux servers and desktops, without the need of a GUI. How to use the command When I first glimpsed Linux, back in 1997, I didn’t quite understand how the find command worked; therefore, it never seemed to function as I expected. It seemed simple; issue the command find FILENAME (where FILENAME is the name of the file) and the command was supposed to locate the file and report back. Little did I know there was more to the command than that. Much more. If you issue the command man find, you’ll see the syntax of the find command is: find [-H] [-L] [-P] [-D debugopts] [-Olevel] [starting-point...] [expression] Naturally, if you’re unfamiliar with how man works, you might be confused about or overwhelmed by that syntax. For ease of understanding, let’s simplify that. The most basic syntax of a basic find command would look like this: find /path option filename Now we’ll see it at work........................ https://www.linux.co...ux-command-line 1 Quote Link to comment Share on other sites More sharing options...
abarbarian Posted March 15, 2017 Share Posted March 15, 2017 Neat find. The link has gone straight into my zim linux bible. 1 Quote Link to comment Share on other sites More sharing options...
securitybreach Posted March 15, 2017 Author Share Posted March 15, 2017 Neat find. The link has gone straight into my zim linux bible. Nice Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.