When there are too many files in the directory, deleting files with RM will error:-bash:/bin/rm:argument list too long hint file too much. The workaround is to use the following command: LS | Xargs-n rm-fr ls Output all file names (separated by spaces) Xargs is the output of LS, each ... When there are too many files in the directory, deleting files with RM will error:-bash:/bin/rm:argument list too long hint file too much. The workaround is to use the following command: LS | Xargs-n rm-fr ls Output all file names (separated by spaces) Xargs is the output of LS, each 10 for a set (with a space delimiter), as the RM-RF parameter that is, all the file name 10 is a group, from the RM- RF removal or sync command with rsync rsync--delete-before-a-H--stats test/cache-bak/test is an empty directory, Cache-bak is to empty the directory when deleting large files, you can use > empty
Delete a large number of small files under Linux