Repository: sharkdp/fd (language: rust)

Issue:
Command 'fd' not found - Ubuntu 20.04.2
**Describe the bug you encountered:**

<!--
Please check out the troubleshooting section first:
  https://github.com/sharkdp/fd#troubleshooting
-->
After installing fd-find either via apt on the command line or through Synaptic, I get:

Command 'fd' not found, but can be installed with:

sudo apt install fdclone

...which appears to be some other program entirely.

I did, also, try linking the fd command per the README file for installing on Ubuntu, but I get the same result.

**Describe what you expected to happen:**

Expected the 'fd' command to work after installing fd-find

**What version of `fd` are you using?**
<!-- paste the output of `fd --version` here -->
Synaptic says, 7.4.0-2build1

**Which operating system / distribution are you on?**
<!--
Unix:    paste the output of `uname -srm` and `lsb_release -a` here.
Windows: please tell us your Windows version
-->
Linux 5.11.0-7614-generic x86_64
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.2 LTS
Release:	20.04
Codename:	focal



Discussion / hints:
On ubuntu and other debian based distros the executable is called `fdfind`. The reason being there was a preexisting package with an executable called fd. You can create an alias or symlink to get the "fd" name 
Thank you!  But with regards to the link, that's what I thought this
expression from the README Installation notes was for:

ln -s $(which fdfind) ~/.local/bin/fd

And it did create the link, which appears to follow through correctly:

$ ls -l ~/.local/bin/fd
lrwxrwxrwx 1 family family 15 Jul 10 20:57 /home/family/.local/bin/fd ->
/usr/bin/fdfind
$ ls /usr/bin/fdfind
/usr/bin/fdfind
$ ls -l /usr/bin/fdfind
lrwxrwxrwx 1 root root 19 Mar 22  2020 /usr/bin/fdfind ->
../lib/cargo/bin/fd
$ ls -l /usr/lib/cargo/bin/fd
-rwxr-xr-x 1 root root 2406944 Mar 22  2020 /usr/lib/cargo/bin/fd

But I still get the "Command 'fd' not found..." result.

'fdfind' does work, of course, now that I know that, but still might be
helpful to know why 'fd' doesn't work.


On Sun, Jul 11, 2021 at 12:48 PM Thayne McCombs ***@***.***>
wrote:

> On ubuntu and other debian based distros the executable is called fdfind.
> The reason being there was a preexisting package with an executable called
> fd. You can create an alias or symlink to get the "fd" name
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/sharkdp/fd/issues/791#issuecomment-877837906>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/APHVUVZJZEGULBFQXH3T3I3TXHKNLANCNFSM5AEZPAOA>
> .
>

Is `~/.local/bin/fd` in your PATH environment variable?
Wasn't.  But after an hour of trying to figure out how to do so properly, I
believe it is now:

$ echo "$PATH"
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/family/.local/bin/fd
$ fd wallpaper

Command 'fd' not found, but can be installed with:

sudo apt install fdclone

...but I get the same result.

And, just to be sure, I did test the 'fd' command using the full path to
make sure it works.  And it does.

$ .local/bin/fd wallpaper
Pictures/Wallpapers




On Sun, Jul 11, 2021 at 10:06 PM Thayne McCombs ***@***.***>
wrote:

> Is ~/.local/bin/fd in your PATH environment variable?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/sharkdp/fd/issues/791#issuecomment-877934125>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/APHVUV5OP3UVSDFXZUMPY5DTXJLZ3ANCNFSM5AEZPAOA>
> .
>

Ah the path in PATH needs to be .local/bin noy .local/bin/fd. It is a folder to search for executables in, not the actual executable.
Hah!  Well, of course.  That should've occurred to me when I used the full
command path.

Should this PATH process be added to the README in addition to the link
information?  Just a thought.

Thanks much for your help!

On Mon, Jul 12, 2021 at 7:12 PM Thayne McCombs ***@***.***>
wrote:

> Ah the path in PATH needs to be .local/bin noy .local/bin/fd. It is a
> folder to search for executables in, not the actual executable.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/sharkdp/fd/issues/791#issuecomment-878679862>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/APHVUVZWENL3BKK6DZFPDBDTXOAFTANCNFSM5AEZPAOA>
> .
>

Yes, thanks. Let's add something like "Make sure that `$HOME/.local/bin` is in your `$PATH`" to the README.

Fix patch:
diff --git a/README.md b/README.md
index 511b23afd..25761752a 100644
--- a/README.md
+++ b/README.md
@@ -500,6 +500,7 @@ sudo apt install fd-find
 Note that the binary is called `fdfind` as the binary name `fd` is already used by another package.
 It is recommended that after installation, you add a link to `fd` by executing command
 `ln -s $(which fdfind) ~/.local/bin/fd`, in order to use `fd` in the same way as in this documentation.
+Make sure that `$HOME/.local/bin` is in your `$PATH`.
 
 If you use an older version of Ubuntu, you can download the latest `.deb` package from the
 [release page](https://github.com/sharkdp/fd/releases) and install it via:
@@ -517,6 +518,7 @@ sudo apt-get install fd-find
 Note that the binary is called `fdfind` as the binary name `fd` is already used by another package.
 It is recommended that after installation, you add a link to `fd` by executing command
 `ln -s $(which fdfind) ~/.local/bin/fd`, in order to use `fd` in the same way as in this documentation.
+Make sure that `$HOME/.local/bin` is in your `$PATH`.
 
 ### On Fedora
 


Test patch: