bash: /bin/rm: Argument list too long

If you’re trying to delete files inside a directory and the following command is not working:

1
2
[/tmp]# rm -rvf ./*
bash: /bin/rm: Argument list too long

In this case you can delete all files using find with appropriate switches:

1
[/tmp]# find . -delete

If you want to delete files in verbose mode:

1
[/tmp]# find . -delete -print
Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: