AIX complains when you try to remove a whole bunch of files. Usually this happens because the parameter list in as the arguments of the command exceeds its limits. To overcome this restrictions you can follow three different methods

The files which we are dealing with are of the following format

sysaix.2014-01-14_21:48:52
sysaix.2014-01-14_21:48:52x
sysaix.2014-01-14_21:48:52xx
sysaix.2014-01-14_21:48:52xxx
sysaix.2014-01-14_21:48:52xxxx
sysaix.2014-01-14_21:48:52xxxxx
sysaix.2014-01-14_21:48:52xxxxxx
sysaix.2014-01-14_21:48:52xxxxxxx
sysaix.2014-01-14_21:48:52xxxxxxxx

As evident it would be an onerous task to remove each file created second by second.

We can use the following methods.

1. My personal favourite

find . -name “log_file*” -type f -exec rm {} \;

It would do everything that is required.

2. Simply cat out all the files of this type to a file and use a for loop in a shell script to remove each and every file in it. I’ll leave the scripting part.

3. The third method can be to increase the list size in the smitty system environment menu. Which is shown in the picture attached.

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here