1752463 Members
5660 Online
108788 Solutions
New Discussion юеВ

Re: Message Error

 

Message Error

Hi,

When executing some of the following commands
chmod" 775 *
rm *

on some directory it deploys me the following message:

sh: / usr/bin/chmod: The parameter list is too long.

That it can be happening?

Operating systems UX 10.20 HP 9000 D390

Thank you,

Orlando
Orlando Oliveira
2 REPLIES 2
RAC_1
Honored Contributor

Re: Message Error

There are too many file that your are trying to remove, chnage the perms.

getconf ARG_MAX
This is causing the problem.

DO it as follows.

chmod xxx [a-fA-F]*
rm -f [a-fA-F]*

You can also dit it as follows.

find . -type f |xargs rm/chmod

Anil
There is no substitute to HARDWORK
MarkSyder
Honored Contributor

Re: Message Error

You have too large a number of files in the directory for the command to cope with.

Try (for example):

chmod 775 a* followed by b* etc.

I'm sure you can group letters together to reduce the number of times you need to type the command, but I'm not 100% on the syntax. It's something like:

chmod 775 [a-b]*

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing