Gentoo Archives: gentoo-user

From: Grant <emailgrant@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Any way around "Argument list too long"?
Date: Sun, 17 Jul 2011 23:25:20
Message-Id: CAN0CFw1CWYSZh-_Kg4gD44OTKdOB8EAJcWNgd4DJXL_pWVzrEg@mail.gmail.com
In Reply to: Re: [gentoo-user] Any way around "Argument list too long"? by David W Noon
1 > way around "Argument list too long"?:
2 >
3 >> My crontab deletes all files of a certain type in a certain folder
4 >> with yesterday's date in the filename.  It usually executes but
5 >> sometimes fails with:
6 >>
7 >> /bin/rm: Argument list too long
8 >>
9 >> What would you do about this?
10 >
11 > Use find with the -delete option.
12
13 I'm getting the same thing from find:
14
15 $ /usr/bin/find /home/user/*-`/bin/date -d 'yesterday' +\%Y\%m\%d`*.jpg
16 /usr/bin/find: Argument list too long
17
18 $ /usr/bin/find -delete /home/user/*-`/bin/date -d 'yesterday' +\%Y\%m\%d`*.jpg
19 /usr/bin/find: Argument list too long
20
21 $ /usr/bin/find /home/user/*-`/bin/date -d 'yesterday' +\%Y\%m\%d`*.jpg|xargs rm
22 /usr/bin/find: Argument list too long
23 rm: missing operand
24 Try `rm --help' for more information.
25
26 - Grant

Replies

Subject Author
Re: [gentoo-user] Any way around "Argument list too long"? Michael Mol <mikemol@×××××.com>
Re: [gentoo-user] Any way around "Argument list too long"? Alan McKinnon <alan.mckinnon@×××××.com>