In Linux, when "rm-rf *" is used to delete a large number of small files in Linux, an error similar to the following may be reported:/bin/rm: argument list too long. this is because the wildcard "*" will be replaced by each matching file name during execution, for example, "rm-rf file1 file2 file3 file4 ″. The system only allocates a small buffer to sort the list. If the buffer is full, shell cannot execute this command. To solve this problem, many people use the find command. Find is used to search for each file, and then pass the rm command one by one based on the file name. The format is as follows: find. -type f-exec rm-v {}\; but this method is very slow for a large number of files. For example, I have deleted more than 200 small files in a directory. The method is to use the built-in "-delete" parameter of the find command. Using this method to delete files, the speed is about 2000 files/second, which is greatly improved compared with the previous method. You can also add the "-print" parameter to display each deleted file. Find. -type f-deletefind. -type d-print-delete, but I do not recommend adding this parameter. If you want to observe the speed of file deletion, we recommend that you use the df-I command to view the indoe node changes.