I created a shell script that logs me in to a server. The script was in a directory that was added to $PATH
I think I might have deleted the script when not paying attention (not on purpose). I cannot find the script anymore. I tried several things:
- use Spotlight (I'm using a Mac - spotlight does pretty much the same as
locate
afaik) - use
which [scriptname]
- go to root and type
find * | grep [scriptname]
None of these solutions located the script. HOWEVER: the script is still working. Even after a reboot.
What is going on here? Is the script still somewhere on my drive?
type scriptname
say? – jw013 Oct 30 '12 at 18:30crontab -l
of your user and root. How does it logon to the server? Ifssh
then you can find the process withps
and track down the parent process leading to the script and its details such as the path – janos Oct 30 '12 at 18:35