well monk has pointed you right direction, howerver you should use popen() function insted of system()/exec() if you need to call a rm or other shell script. It is bit secure to use popen() then system(), IMPO
Quote:
|
The popen() function opens a process by creating a pipe, forking, and invoking the shell. Since a pipe is by definition unidirectional, the type argument may specify only reading or writing, not both; the resulting stream is correspondingly read-only or write-only.
|