2

Some long time ago I've created a script which I've added to my Ubuntu system and I'm able to call it simply with call to command rec

MeUser@MyMachine:~$ rec

The problem is that now I'd like to extend the command but I can't figure out where the script can be found and what the rec command refers to.

I assume I can do it (it's Ubuntu after all) but it's not so simple - I've already looked into ~/.bashrc but I did not find anything which refers to rec. Where else can I search?

2 Answers 2

4

You installed it somewhere in your $PATH when you can call it just like that in the command line. Use type to find out where:

type rec
rec is /usr/local/bin/rec

Or maybe it's an alias, then it whould look like:

rec is aliased to `myscript --with --some --parameters blah'

You can then use type on myscript to find out where it lays.

1
  • Thanks it helped when I did type rec I got rec is hashed (/usr/bin/rec) Oct 13, 2015 at 6:53
2

In bash you can locate files on your $PATH with the which command. eg:

which rec

And you can list aliases with the alias command. Simply type alias.

You will find your script with one these.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .