Due to encoding reasons, garbled characters will be generated when uploading or creating Chinese files or directories on a Linux server. If you want to delete it, you cannot delete it with the rm command. In this case, you can use the find command to delete the garbled files or directories. In the Linux file system, each file has an i-node number, and the files can be managed by the i-node number. First enter the directory where the garbled file or directory is located Use the ls -i command to find the inode of a file or directory. The numeric string in front of the file or directory is the inode. Next, use the find command to query and delete this file or directory. Note: This method only works for deleting files or empty folders. How to delete a non-empty folder? First, check the inode, and then use the following command: find -inum 2236429 -exec rm -rf {} \; It will prompt that the file or folder cannot be found, but it has actually been deleted. How to delete files with garbled or special characters in the file name under Linux. I encountered a problem today. A file name is
I started thinking about deleting with quotes, but found that deleting with quotes also reported an I found some information and found that this kind of file can be deleted like this First ls -i to find the file's inode, then delete it with the find command [localhost]ls -ilrt 100985 -rw-r--r-- 1 tbcs users 0 Apr 18 11:32 -MXV9.log The 100985 in the first column is the inode of the file. Execute the following command on the host to delete the file [localhost]find ./ -inum 100985 -exec rm {} \; This method is suitable for deleting files with garbled or special characters. For example, if the file name is "*.txt" and you directly execute rm *.txt, all files ending with .txt in the folder will be deleted. Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: Navicat for MySQL scheduled database backup and data recovery details
>>: Videojs+swiper realizes Taobao product details carousel
Table of contents 1. Concept Memory management mo...
Table of contents 1. Installation 2.APi 3. react-...
The META tag is an auxiliary tag in the head area...
CSS3Please Take a look at this website yourself, ...
Today I found a problem in HTML. There are many d...
1. Demand We have three tables. We need to classi...
1. Scenario display The tomcat log occasionally r...
MongoDB Installation Choose to install using Yum ...
introduction As usual, let's start with a sce...
Detailed example of clearing tablespace fragmenta...
Table of contents Preface Global Lock Full databa...
HTML5 adds more semantic tags, such as header, fo...
If you don't want to use javascript control, t...
A few days ago, when I was adjusting a module of a...
hint This plug-in can only be accessed under the ...