Argument list too long - help

Preston Hagar prestonh at gmail.com
Wed Jun 10 19:10:03 UTC 2009


On Wed, Jun 10, 2009 at 1:48 PM, Carl
Friis-Hansen<ubuntuuser at carl-fh.com> wrote:
> I just discovered that ZoneManager has stored some 87000 png files in a
> directory.  I have no use of them and wanted to remove them.
> That turned out not to be so strait forward:
>
> carl at cjfh3:~$ rm Webcam_Pictures/*.png
> bash: /bin/rm: Argument list too long
> carl at cjfh3:~$
>

cd into the directory then try

find . -iname '*.png' --delete


If you want a list of what it will delete, run it without the --delete
first and it will print out the file list.


Hope this helps,

Preston




More information about the ubuntu-users mailing list