As a general security consideration, privileged commands
should do as little as possible and do highly specific
things. This minimizes the chance a mistake or exploit
can cause more damage than it should.
In this case, you probably should resolve the glob ("*")
first while unprivileged, and then call a sequence of
highly specific "rm" commands with the results.
The standard C library in <glob.h> (among other approaches)
handles "*". Run "man 3 glob" in a terminal for more
information on the glob() function.
e.g. glob("test*.txt") might yield test1.txt and test2.txt.
With those results, you could generate commands like:
"rm test1.txt"
"rm test2.txt"
(or simply "rm test1.txt test2.txt").
Kevin G.
for example, "rm test*.txt"
Thanks!
网 易 Yeah.net 免 费 邮 箱 全 新 改 版,珍 藏 帐
号 开 放,快 来 抢 注 >>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/mikey-san%
40bungie.org
This email sent to email@hidden