in reply to Is this system call hazardous for my computers health??
Your use of the list form of system is good, that avoids having the shell interpolate (there's that word again) the argument string. I'm not sure you want the asterisk at the end, as it may remove all of the files in the current working directory, which is hardly what you want. I'd also recommend you look into File::Path instead, specifically the rmtree() function.
In general, I trust built-in functions more than system calls.
Update: Upon quick testing with bash, rm -rf -i dirname/ * does just as I suspected -- removing dirname/ recursively AND all of the files in the current directory. It's up to you.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RE: Is this system call hazardous for my computers health??
by zzspectrez (Hermit) on Nov 16, 2000 at 05:10 UTC | |
by tye (Sage) on Nov 17, 2000 at 05:31 UTC |