Adam Brenner wrote: > I have an enhancement requests and patch ready for unlink to support > multiple arguments. Currently unlink does not accept more than one > argument to remove a link. I have a patch that adds that > functionality. For example: > > $ unlink link1 link2 link3
Why are you using unlink here instead of rm? I think you are using the wrong tool for the job. Why even care if unlink can take multiple arguments? It used to be that unlink existed for tasks such as allowing the superuser to unlink the ".." entry from a directory. Which was one additional layer in a chroot to prevent crawling out of it. Which was why the older documentation mentions needing sufficient privileges. This unlinking of ".." isn't allowed anymore on recent file systems and other container practices have appeared making this practice obsolete. > Is this something the community would like for me to submit? I do not have a strong opinion. Traditional Unix systems only allowed one argument and no options. *BSD now allows multiple arguments and includes various options. It would be nice to be compatible with *BSD. I think the main reason why it doesn't matter that unlink can have multiple arguments or not is that one should be using rm for this task instead. If one uses unlink and multiple arguments then they are using the wrong tool. Bob
