File deletion limit

I was told that Sol 9 will not allow you to remove more than 20,000 files using the rm command... does anyone know if this is true? Also, if this is the case, how do we increase this number? Perhaps an entry in /etc/systems? I only suggest that because you set things in there like the max number of secondary groups allowed per user, physical memory parameters, etc.

[381 byte] By [snowmn] at [2007-11-25 23:38:53]
# 1
I'm guessing here, but if there is a limit, it's due to the command line length. To get around this, you could use the "xargs" command. HTH,Roger S.
Jo_nage at 2007-7-5 18:22:39 > top of Java-index,General,Talk to the Sysop...
# 2
However, if using xargs I think it would be best to also keep in mind how you're calling it. I could imagine that a "find ./ -type f -name <match> | xargs rm" could have the same results if the find command found too many files as well ;-)
LionO at 2007-7-5 18:22:39 > top of Java-index,General,Talk to the Sysop...
# 3
A limit, don't think so, as root cd / then rm -rf *, no matter how many files are there it's all gone....though I will admit, never did a file count....but it cleaned out 8 D1 array's loaded with 74g drives and was very careful about proof reading scripts after that LOL..
richpierson at 2007-7-5 18:22:39 > top of Java-index,General,Talk to the Sysop...
# 4

> However, if using xargs I think it would be best to

> also keep in mind how you're calling it. I

> could imagine that a "find ./ -type f -name <match> |

> xargs rm" could have the same results if the find

> command found too many files as well ;-)

Why would that be? I don't see any obvious limits in your example. Xargs understands about exec limits and will run multiple 'rm' commands if necessary. The automatic calculation of the command line is one of the reasons for its existence.

Note you can do almost the same thing with simply:

find . -type f -name <match> -exec rm {} +

--

Darren

Darren_Dunham at 2007-7-5 18:22:39 > top of Java-index,General,Talk to the Sysop...
# 5

> A limit, don't think so, as root cd / then rm -rf *,

> no matter how many files are there it's all

> gone....

The limit is on the command line itself. Unix has restrictions on the size of the argument list you can pass to any program. If the '*' above expands too much, then the command will not be run.

It doesn't matter how many files are underneath, just what the '*' turns into.

--

Darren

Darren_Dunham at 2007-7-5 18:22:39 > top of Java-index,General,Talk to the Sysop...