HostOnNet Blog

Delete Large Number of files in a folder

Looking for Linux Server Admin or WordPress Expert? We can help.

On linux, i was asked to delete a folder with lot of files.

When i try to delete the file with rm if *, i got error, too big arguments.

The files are deleted with command

find /home/mwp2007/mail/new -type f | xargs rm -f

/home/mwp2007/mail/new is the folder which contain the files.

Posted in Cpanel Server, Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.