The fd command provides a simple and straightforward way to search the Linux file system. fd is a blazingly fast, Rust-based replacement for the Unix/Linux find command. It does not provide all of the powerful features of find. However, it does provide enough functionality to cover 80% of the situations you are likely to encounter. Features such as well-planned and convenient syntax, colored output, smart casing, regular expressions, and parallel command execution make fd a very capable successor. Install Go to the fd GitHub page and see the installation section. It covers how to install programs on macOS, Debian/Ubuntu Red Hat, and Arch Linux. Once installed, you can get a complete overview of all available command line options by running help, fd -h for concise help, or fd --help for more detailed help. Simple search fd is designed to help you easily find files and folders in your file system. You can perform the simplest search using fd with a single argument, which is whatever you are searching for. For example, suppose you want to find Markdown documents that contain the word services as part of the file name: $ fd services downloads/services.md If called with only one argument, fd recursively searches the current directory for any files and/or directories that match the given argument. An equivalent search using the built-in find command would be: $ find . -name 'services' downloads/services.md As you can see, fd is much simpler and requires less typing. Doing more with less input is always right in my mind. Files and folders You can limit the search to files or directories using the -t parameter followed by the letter that represents what you are searching for. For example, to find all files in the current directory that contain services in their filenames, you could use: $ fd -tf services downloads/services.md And, find all directories in the current directory whose file names contain services: $ fd -td services applications/services library/services How to list all documents with .md extension in the current folder? $ fd .md administration/administration.md development/elixir/elixir_install.md readme.md sidebar.md linux.md As you can see from the output, fd can not only find and list files in the current folder, but also find files in subfolders. It's very simple. You can even search for hidden files using the -H switch: fd -H sessions . .bash_sessions Specify a directory If you want to search a specific directory, the name of the directory can be passed as the second argument to fd: $ fd passwd /etc /etc/default/passwd /etc/pam.d/passwd /etc/passwd In this example, we tell fd that we want to search the etc directory for all instances of the word passwd. Global Search What if you know part of the file name, but not the folder? Suppose you downloaded a book on Linux network administration, but you don't know where it is saved. No problem: fd Administration / /Users/pmullins/Documents/Books/Linux/Mastering Linux Network Administration.epub Summarize fd is an excellent replacement for the find command and I'm sure you'll find it as useful as I do. To know more about the command, just browse the man page. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: MySQL 8.0.11 installation tutorial with pictures and text
>>: A brief discussion on the implementation principle of Vue slot
I always thought that Docker had no IP address. I...
Mac uses Shell (Terminal) SSH to connect to the r...
This article mainly explains tables, which are no...
1. Try to use single column instead of multi-colum...
Click here to return to the 123WORDPRESS.COM HTML ...
I'm currently learning about front-end perform...
Table of contents 1. Introduction 2. Main text 2....
How to implement text icons through CSS /*icon st...
Table of contents Overview Checking setTimeout() ...
TranslateThis URL: http://translateth.is Google T...
Source of the problem As we all know, all network...
Table of contents Preliminary Notes Problem Repro...
<br />This article has briefly explained the...
[Problem description] Our production environment ...
Table of contents 1 Introduction 2 Basic usage 2....