How to delete specified files in linux

coldplay.xixi
Release: 2020-12-18 11:50:49
Original
10346 people have browsed it

Linux method of deleting specified files: Use the delete command [find specified folder/ -name this.html~ |xargs rm -rf]. There is no file named [fingerprint.default_WFH.so] in the out directory. The files have been deleted.

How to delete specified files in linux

The operating environment of this tutorial: windows7 system, linux7.3 version. This method is suitable for all brands of computers.

【Recommended related articles: linux tutorial

Linux method of deleting specified files:

1. Sometimes it is necessary Delete the specified file name command in a certain folder directory, because sometimes the subdirectories inside contain many files with such file names. If you delete them one by one, it is very troublesome. Here is a good method. I have tested it myself. Yes, it can be used, and it is very convenient and efficient when used.

2. Command format:

find   指定的文件夹/ -name this.html~ |xargs rm -rf
Copy after login

3. I now want to delete all fingerprint.default_WFH.so files in the out/ directory.

4. First, let’s take a look at the current number of fingerprint.default_WFH.so files in the out directory of my project.

How to delete specified files in linux

5. Next execute the command: find out/ -name fingerprint.default_WFH.so |xargs rm -rf command, look at the result, out There is no file named fingerprint.default_WFH.so in the directory. They have all been deleted. It is a very powerful command.

How to delete specified files in linux

#6. Of course, this command can be expanded and is very practical.

A: Delete all files in the directory with the file name fingerprint.default_WFH.so:

find /  -name fingerprint.default_WFH.so  |xargs rm -rf
Copy after login

B: Delete all files in the directory with the suffix so:

find /  -name *.so  |xargs rm -rf
Copy after login

Related free learning recommendations: php programming (video)

The above is the detailed content of How to delete specified files 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