ADSM-L

Re: AIX Question!

2002-07-10 10:17:23
Subject: Re: AIX Question!
From: Hamish Marson <hamish AT TRAVELLINGKIWI DOT COM>
Date: Wed, 10 Jul 2002 15:15:31 +0100
Al'shaebani, Bassam wrote:

Hello All,
I'm came across an issue yesteday, does anyone know a way around
deleting a large number of files without getting the 'parameter too
long'
message. i.e. I was trying to delete all the file that began with
program*.
There were too many files, so I had to actually cut my search down, to
something like program01* and so forth, to avoid the error message.



That's a shell issue, not necessarily an AIX issue. The problem is that
the shell is responsible for expanding the commandline parameters. Thus
typing *, the shell expands that to ALL the file that match (i.e. all of
them).

For instances like this, there are probably more ways than I have
fingers, but genrally one that will always work is using find. e.g.

find <dir> -name '*' -exec rm {} \;




Thanks......

Regards,
Bassam




--
I don't suffer from Insanity...         | Linux User #16396
I don't suffer from Insanity...         | Linux User #16396
       I enjoy every minute of it...   |
                                       |
http://www.travellingkiwi.com/          |
<Prev in Thread] Current Thread [Next in Thread>