I tried out the usability of the search command 'fd', which is simpler and faster than the 'find' command, and is made in Rust and has over 30,000 stars on GitHub

'find' is a Linux command for searching files and directories. A faster and more user-friendly Rust alternative to find, ' fd ', has been developed, so I decided to test it out.
GitHub - sharkdp/fd: A simple, fast and user-friendly alternative to 'find'
https://github.com/sharkdp/fd
Since fd can also be used on Windows, we will review it on Windows this time. First, to install fd, open the start menu, search for 'powershell', and click 'Run as administrator' for Windows PowerShell in the search results.

Enter the following command to install fd.
[code]winget install sharkdp.fd[/code]
When you see the message 'Installation complete,' you're ready to go.

Let's try using fd right away. By entering 'fd [search string]', it will output a list of files and folders that contain the [search string] in the current folder or below.

If you specify a folder as the second argument, such as 'fd [search string] [folder name]', you can search within that folder.

Although it seems to run at a lightning speed, let's check how much faster it actually is than the basic command. For comparison, we use the command '
dir -s
', which is equivalent to Linux's find, and use ' Measure-Command ' to measure the processing speed. To check the speed of 'dir -s', just run the following command.[code]Measure-Command { dir -s }[/code]
The execution time was about 1.57 seconds.

Similarly, check the speed of 'fd' with the following command.
[code]Measure-Command { fd }[/code]
The same process was completed in about 0.25 seconds on fd, which is more than six times faster.

According to
the description in the official repository
, in addition to speed, it has the following advantages:- Intuitive syntax
- Supports regular expressions and globbing patterns
- Colorful display for each file type
- Supports parallel command execution
- Searching with lowercase letters is case insensitive, while searching with mixed uppercase letters is case sensitive
- Ignore hidden directories and files by default
- Ignore patterns in .gitignore by default
The command name is only two characters long, 50% shorter than the four-character find command.
Related Posts: