$ touch ... ...0
$ ls -a
. .. ... ...0
$ find -name ...
./...
$ fd -FH ...
...
...0
$
Which shell are you using? Note that some shells treat the unescaped ... as an alias for ../... zsh does this, for example:
zsh> echo ...
../..
This, in turn, leads fd -F to search for the string literal ../.. - which will not be found.
The following works for me in both zsh and bash:
βΆ touch '...'
βΆ fd -H
...
βΆ fd -FH '...'
...
βΆ touch '...0'
βΆ fd -H
...
...0
βΆ fd -FH '...'
...
...0
This looks perfectly fine for me?
I use bash.
The issue is that you cannot locate ONLY the file ... without getting other files with three dots in their filenames in the output of fd.
If you have _thousands and thousands of files with three dots in the filenames_, how do you find the file with the filename ... using fd? The output will be very long.
If you use find like this:
$ find -name ...
./...
$
it locates exactly what you're searching for: the file ... while ignoring other files having ... in their filenames.
In other words, if you have files bb, abbc, aabbcc, you can locate the file bb by using regex ^bb$ like this:
$ ls
aabbcc abbc bb
$ fd bb
aabbcc
abbc
bb
$ fd ^bb$
bb
$
But you _cannot_ do like this with the file named ... because in this case you have to use the option -F which does not let you use regexes.
But you cannot do like this with the file named ...
You can still use a regex, you just have to escape the dots:
fd '^\.\.\.$'
or
fd '^\.{3}$'
Another option is to use a character class [β¦] with just a single entry:
fd '^[.]{3}$'
Oh, thatβs really great! Thank you for your support.
βββββββββββββββββββββββ
SOLVED!
Most helpful comment
Oh, thatβs really great! Thank you for your support.
βββββββββββββββββββββββ
SOLVED!