running a simple command line tool

Avi Greenbury lists at avi.co
Wed Feb 22 14:36:22 UTC 2012


On Wed, 22 Feb 2012 07:53:05 -0600
CJ Tres <ctres at grics.net> wrote:

> I have downloaded an mp3 player sync tool called natool, for the
> Neuros II DAP. It is a simple command line tool and non-interactive.
> 
> It successfully decompressed and installed (using a perl script)
> after the dev included a perl module that was needed.
> 
> The man page shows how to copy music to the player:
> (back slashes were used by the developer to indicate different parts
> of the command)
> 
> natool --neuros-path /mnt/neuros \
>                  dirsync ~/music/ my_music \
>                  dbsync
> 
> However when I run the above command the return tells me that no
> command 'natool' was found and suggests that I may have meant 'atool'
> 
> after unpacking and installing I cd'd to the resultant directory to
> run the command.
> Clearly I'm doing something wrong but I've not been able to discover 
> what that is.
> 

If you enter simply the name of what you want to run, like

$ natool

Then your shell will try to find it in your $PATH. $PATH is a variable
that contains a colon-delimited list of directories in which you can
expect to find binaries to run (run   echo $PATH   if you're interested
in what they are.

If you want to run a command outside of the $PATH you need to provide
the path to it. If it's in your current directory, that's simply './',
so you might do 

$ ./natool 

to run natool in your current directory, and ../natool to run something
called natool in your parent directory. What you probably want,
therefore, is:

./natool --neuros-path /mnt/neuros dirsync ~/music/ my_music dbsync

-- 
Avi.




More information about the ubuntu-users mailing list