scenario :
- I'm in a place that is not in PATH
- I have a file name
dofoo
that is executable - I want to create symbolic link in
/usr/bin
that points todofoo
in current directory
quite hard to get the basics. I can do with
$ cd /usr/bin
$ sudo ln -s /previous/path/dofoo
$ cd /previous/path
but I'd like to be this done with single command. here's what I have tried(assuming I'm in /previous/path):
$ sudo ln -s dofoo /usr/bin/dofoo
$ /usr/bin/dofoo
bash: /usr/bin/dofoo: Too many levels of symbolic links