Comments on: /bin/rm: Argument list too long. http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/ Blog of a Programmer. Sun, 22 Jun 2008 09:21:13 +0000 http://wordpress.org/?v=2.5.1 By: Stephen http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-24493 Stephen Wed, 02 Jan 2008 22:05:53 +0000 http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-24493 To touch on the issue Vinay raised, I had to use the -wholename option on the find command to delete files from multiple directories. The following got rid of all the incomplete files in my audio stream directories quite nicely: find /usr/local/Streams/ -wholename '*/incomplete/*' -print0 | xargs -0 rm -f To touch on the issue Vinay raised, I had to use the -wholename option on the find command to delete files from multiple directories. The following got rid of all the incomplete files in my audio stream directories quite nicely:

find /usr/local/Streams/ -wholename ‘*/incomplete/*’ -print0 | xargs -0 rm -f

]]>
By: Sadanand http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-24486 Sadanand Sun, 14 Oct 2007 10:56:07 +0000 http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-24486 This helped me a lot. Thanks This helped me a lot. Thanks

]]>
By: Jeff http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-5187 Jeff Fri, 05 Jan 2007 18:45:46 +0000 http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-5187 Dipu, exec works because find passes the filenames one at a time. Dipu, exec works because find passes the filenames one at a time.

]]>
By: Dipu http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-5123 Dipu Thu, 04 Jan 2007 19:50:46 +0000 http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-5123 I feel using exec from find command is bound to fail since the argument list will be too long for it to handle. From somewhere else on net. getconf ARG_MAX gives the maximum number of arguments that commands can take... I feel using exec from find command is bound to fail since the argument list will be too long for it to handle.

From somewhere else on net.

getconf ARG_MAX gives the maximum number of arguments that commands can take…

]]>
By: Steven Roddis http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-3638 Steven Roddis Fri, 24 Nov 2006 03:10:41 +0000 http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-3638 Yes, but it won't delete the directories. Yes, but it won’t delete the directories.

]]>
By: Vinay http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-3627 Vinay Thu, 23 Nov 2006 06:59:16 +0000 http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-3627 Hi, i want to delete all webalizer stats of my server. will this command work for this: find . -name '/home/*/tmp/webalizer/*' | xargs rm Please let me know. Regards, Vinay Hi,

i want to delete all webalizer stats of my server. will this command work for this:

find . -name ‘/home/*/tmp/webalizer/*’ | xargs rm

Please let me know.

Regards,

Vinay

]]>
By: Anonymous http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-2275 Anonymous Mon, 09 Oct 2006 06:32:24 +0000 http://www.stevenroddis.com/2006/10/07/binrm-argument-list-too-long/#comment-2275 find . -name ‘11*’ -exec rm "{}" \; find . -name ‘11*’ -exec rm “{}” \;

]]>