I recently discovered a problem. Under Linux, if there are too many files in a directory and the file names are too long, if you want to delete the file system, you will be prompted for Argument list too long. If you use rm -rf * to delete, It will prompt that this is a Linux shell restriction issue. You can use the following method to achieve this:
Enter the directory you want to enter as root
Execute:
ls|xargs rm -f
#You can delete them all
This is more efficient
The above is the detailed content of A very simple way to solve the problem of deleting too many files and being restricted by the shell in Linux. For more information, please follow other related articles on the PHP Chinese website!