fd
fd
cool alternative to find, ignores things like .git and node_modules etc.
format output
use with --format, for example: --format {/} to only return the filename
| Placeholder | Expands to |
|---|---|
{} | full path |
{.} | full path minus extension |
{/} | basename |
{/.} | basename minus extension |
{//} | parent directory |
find exact match
let’s say I want to search for curl in a folder, but not for curl.rb
fd -g curl /opt/homebrewthis might not yield any results, so combine it with -u to ignore the smart ignore list (the cool feature about fd… yes):
fd -gu curl /opt/homebrewignore ignore list
ignore the ignore list to find things, major major major major. aka unrestricted mode
fd -u <pattern> /your/pathinclude hidden files
fd -uu <pattern> /your/pathfind all dotfiles in your home directory
fd --hidden --max-depth 1 --follow --type file '^\.' ~
fd --hidden --max-depth 1 --follow --type file --format '{/}' '^\.' ~ # just show the filename