Às 05:00 de 12/10/22, Paulo da Silva escreveu:
Hi!
The simple question: How do I find the full path of a shell command
(linux), i.e. how do I obtain the corresponding of, for example,
"type rm" in command line?
The reason:
I have python program that launches a detached rm. It works pretty well
until it is invoked by cron! I suspect that for cron we need to specify
the full path.
Of course I can hardcode /usr/bin/rm. But, is rm always in /usr/bin?
What about other commands?
For now I will postpone this problem.
I just wrote a small script to delete a dir using rm and it works even
under cron!
There is another problem involved. The script, works fine except when
launched by cron! Why?
I'll have to look into this later when I have more time.
For now I solved the problem using a complementary shell script.
Thank you very much to those who responded.
Paulo
--
https://mail.python.org/mailman/listinfo/python-list