Gentoo Archives: gentoo-user

From: victor romanchuk <rom@××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Any way around "Argument list too long"?
Date: Sun, 17 Jul 2011 19:53:08
Message-Id: 4E233D61.3040403@persimplex.net
In Reply to: [gentoo-user] Any way around "Argument list too long"? by Grant
1 it could be slightly less efficient comparing to plain `rm', but worked around
2 your problem:
3
4 find <your-dir> -ctime -1 -exec rm {} \;
5
6 basically `find' has a lot options filtering result set. these include
7 time/date, file name (regexp), file type and so on. consult man for details
8
9 victor
10
11
12 Grant wrote, at 07/17/2011 11:32 PM:
13 > My crontab deletes all files of a certain type in a certain folder
14 > with yesterday's date in the filename. It usually executes but
15 > sometimes fails with:
16 >
17 > /bin/rm: Argument list too long
18 >
19 > What would you do about this?
20 >
21 > - Grant
22 >