[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 8 Aug 2022 03:43:16 -0500
* On 2022 07 Aug 13:03 -0500, Ed wrote:
> Is this the correct way to start it ?
> ./winkeydaemon -n -d /dev/ttyUSB0
> This is what I get
> bash: ./winkeydaemon: No such file or directory
> The directory it is in is in my path.
Then the ./ is not required. In essence, the ./ tells the shell to run
the command that is found in the current directory and to look nowhere
If, say, you have winkeydaemon in $HOME/local/bin and that directory is
also in your path, then if you're in $HOME/logs/test, use of the ./
tells the shell to only run the winkeydaemon command that is found in
$HOME/logs/test and ignore the path. As there is likely no executable
file named winkeydaemon in $HOME/logs/test the shell reports that the
command could not be found.
If this is your situation, then simply do not prepend the ./ to the
In many cases, the user's $PATH variable will contain '.' so that the
normal user account can run a command found in the current working
directory. It is also customary for this to not be included in root's
$PATH so the ./ is often provided in examples for root to run a command
from the current working directory.
As an example, here is my $PATH:
$ echo $PATH
In my case, the current directory will be searched before any of the
system directories but after my custom 'bin' directories in my user
account. Conversely, it is omitted for the root account (Debian
# echo $PATH
Hope that helps.
"The optimist proclaims that we live in the best of all
possible worlds. The pessimist fears this is true."
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819
Description: PGP signature
winkeydaemon, Ed, 2022/08/29