'rm' Can not delete files
Robert Huff
roberthuff at rcn.com
Wed Feb 8 18:41:09 UTC 2012
David Brodbeck writes:
> > What helps me sometimes is wrapping it up:
> >
> > for i in *; do rm $i; done
>
> Won't that just expand the * and result in the same problem? It
> seems like you've just moved the problem from the rm statement to
> the for statement.
If the problem is the command line to rm being too long, this
will work.
Yes, the '*" will get expanded to the list of files ... but
that will happen _within_ the running shell. (Using the services of
glob(3) or something similar.)
The command line to "rm" will have a single file-name, and
should not be a problem.
Robert Huff
More information about the freebsd-questions
mailing list