Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Argument list



"David Gómez" <david@xxxxxxxxxxxx> writes:

> I created a directory with 100000 files to test the new htree patch
> for the ext3 filesystem, and found a bug when I tried to remove all
> the files.  The command 'rm *' gave the error 'zsh: argument list too
> long'. If expansion doesn't support so many parameters, what it's the
> supossed way to remove all these files without deleting the directory?

This is actually an OS limit rather than a zsh limit.  IIRC, zsh
dynamically alocates space for arguments as needed.  However, the OS
usually has a hard limit set somewhere.

ls | xargs rm

though there's probably a cleaner way.  Season the 'ls' command to
taste.

Jason



Messages sorted by: Reverse Date, Date, Thread, Author