A very simple way to solve the problem of deleting too many files and being restricted by the shell in Linux

巴扎黑
Release: 2017-09-04 15:36:14
Original
2338 people have browsed it

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
Copy after login

#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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!