cd /ud/TEST/_PH_
find . -mtime +90 -exec rm {} \;
With find you're working with one file at a time so you should never
hit
the limit.
Another point to remember is using xargs you can control the number of files
in each rm.
For example
find . -mtime +90 | xargs -l20 rm (deletes 20
Bounce notice: If you read this list through Indexfocus, Nabble, or any other
replicator - and you would like to be able to participate - sign up
directly with us. Here's all you need to know: To subscribe or
resubscribe please visit http://listserver.u2ug.org/.
REPOSTED FOR NON-MEMBER ADDRESS:
Hi all.
This is a bit off-topic, but I believe the expertise is here. . .
I have routines that parse through Unix files in a directory and remove
them based on age. If the number of files exceeds some limit I've not been
able to narrow down, I get a response from the scripts that it can't do
the
NCARGS value configuration (5.1.0)
In AIX 5L Version 5.1, the option has been added to allow the super user or
any user belonging to the system group to dynamically change the value of
the NCARGS parameters. In previous releases of AIX, these values were
permanently defined as 24576, which
Argument list too long
Hi all.
This is a bit off-topic, but I believe the expertise is here. . .
I have routines that parse through Unix files in a directory and remove
them based on age. If the number of files exceeds some limit I've not been
able to narrow down, I get a response from the scripts
Does anyone know:
1. what I'm talking about and what causes it?
Commands like rm have what appears to be (not a scientific analysis, and if
memory serves) an 8K name space limit, including delimiters...
2. how to solve this through some tunable parameter, preferrably not
requiring a kernel
There is a parameter somewhere that lets you control the maximum size of an
AIX input statement, but not only do I not know where this is, if there's a
max you're inevitably going to run into it periodically no matter how big it
is. So rather than using AIX's poor excuse for globbing, I've been
2007 15:55
To: u2-users@listserver.u2ug.org
Subject: [U2] AIX Argument list too long
Hi all.
This is a bit off-topic, but I believe the expertise is here. . .
I have routines that parse through Unix files in a directory and remove
them based on age. If the number of files exceeds some limit I've
to be a directory path)
find . -type f -mtime +30 -exec ls -l {} \;
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, August 21, 2007 8:55 AM
To: u2-users@listserver.u2ug.org
Subject: [U2] AIX Argument list too long
Hi all
@listserver.u2ug.org
cc
Subject
[U2] AIX Argument list too long
Hi all.
This is a bit off-topic, but I believe the expertise is here. . .
I have routines that parse through Unix files in a directory and remove
them based on age. If the number of files exceeds some limit I've not been
able
Hi Karl,
We ran into this too, and the Unix xargs command took care of it
nicely.
Example:
The following purge will delete the files for a single month (assuming
you don't keep more than a year's worth, in which case you'll need to
check the year, too).
This string will prompt before purging
This is a common problem, where the shell expands the argument list until it
blows up. The most common way around this is to use xargs:
http://www.unixreview.com/documents/s=8274/sam0306g/
/Scott Ballinger
Pareto Corporation
Edmonds WA USA
206 713 6006
On 8/21/07, [EMAIL PROTECTED] [EMAIL
On 8/21/07, Kevin King [EMAIL PROTECTED] wrote:
[snip]
cd /ud/TEST/_PH_
find . -mtime +90 -exec rm {} \;
With find you're working with one file at a time so you should never hit
the limit.
Yes, however using find + xargs is more efficient than executing rm on each
individual instance of
files.
From: Jeff Schasny [EMAIL PROTECTED]
Reply-To: u2-users@listserver.u2ug.org
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] AIX Argument list too long
Date: Tue, 21 Aug 2007 08:51:30 -0600
NCARGS value configuration (5.1.0)
In AIX 5L Version 5.1, the option has been added to allow
14 matches
Mail list logo