>>>>> "Коньков" == Коньков Евгений <kes-...@yandex.ru> writes:
Коньков> # rm * Коньков> /bin/rm: Argument list too long. Коньков> in this directory about 25000 files, Коньков> but actually there is only one argument to rm it is '*' sign. Коньков> Why rm get list of all files in directore instead of deleting Коньков> one by one? It's the way Unix works. Individual commands typically know nothing of '*' or '[abc]'. The shell "globs" the command, expanding it to all the matching files, and then hands that list to the command as individual arguments. However, sometimes that expansion exceeds the maximum argument size, as you discovered. If you have perl, try this: perl -e 'unlink glob("*")' It uses Perl's internal glob() function, which can handle an unlimited number of files. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"