Re: /bin/rm: Argument list too long.
On Fri, 19 Nov 2004, Dennis Koegel wrote: find /foo/bar -type f -maxdepth 1 | xargs rm -n100 Although xargs is the most versatile solution for when having too many items listed, for just deleting find itself can do it.. find /foo/bar -n mask -delete ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
/bin/rm: Argument list too long.
Hi, I tried to delete all files from a dir, however I got this message: /bin/rm: Argument list too long. So, no go. newfs is also no option, because the dir is not a seperate fs. Any hints exept for manual labour? Bye, Mipam. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: /bin/rm: Argument list too long.
On Fri, Nov 19, 2004 at 09:58:40AM +0100, Mipam wrote: I tried to delete all files from a dir, however I got this message: /bin/rm: Argument list too long. You probably did rm *, and * expanded to too many files. One way is to simply remove the directory completely (rm -r /foo/bar), but this also removes all subdirectories. Other way would be to use find and xargs; in this example for only the files in one specific directory and no subdirectories (and no symlinks, that is): find /foo/bar -type f -maxdepth 1 | xargs rm -n100 ... where -n controls the number of arguments passed per one execution of rm. HTH, - D. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: /bin/rm: Argument list too long.
Mipam wrote: Hi, I tried to delete all files from a dir, however I got this message: /bin/rm: Argument list too long. So, no go. newfs is also no option, because the dir is not a seperate fs. Any hints exept for manual labour? Bye, Mipam. I gather it's rm * that's not working? If so, try a subset, e.g. rm a* or something else that's fairly common, and see if you can just rm * after that. -BB ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: /bin/rm: Argument list too long.
On Fri, Nov 19, 2004 at 10:19:39AM +0100, Dennis Koegel typed: snip find /foo/bar -type f -maxdepth 1 | xargs rm -n100 or just ls | xargs rm ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]