Last update at :2024-06-18,Edit by888u
A few days ago, I helped a netizen deal with a server problem. This friend installed a panel and the panel could not be opened. After restarting Nginx, I found an error "No space left on device", which should be a disk. Caused by lack of space. Then according to your habits, it must be caused by cache files or accumulation of system spam. Just delete it directly.
Then find the directory of the larger file through sorting. You should see that you can delete it directly through rm, but after execution, an error "/bin/rm: Argument list too long\\" appears, which should be in the directory. Caused by too many files and too long processing time.
ls | xargs -n 10 rm -rf
Use the xargs command to divide the files into groups of 10 and then delete them in batches so that no errors will occur.
Remarks: When we execute the above command, we must be careful and execute it in the directory where the files currently need to be deleted. Do not operate in other directories, otherwise you will delete files in other directories.
Recommended site search: Wanwang registered domain name query cn domain name, mainland China site group server, server hosting, cloud server vps, php virtual space, good domain name registration, server space rental, filing network, US unlimited content hosting, < /p>
发表评论