This article introduces the relevant knowledge of "how to correctly handle garbled files in Linux". During the operation of actual cases, linux files are garbledlinux files are garbledlinux version qq, Many people will encounter this dilemma, and let the editor lead you to learn how to deal with this situation! I hope you will read it carefully and learn a lot!
Linux is different from windows. Linux servers only support numbers, English and other characters, and cannot recognize English characters. Therefore, after we decompress the packaged and uploaded files, English garbled files and folders appear.
When the file name is garbled, the file name cannot be input through the mouse, so you cannot directly use rm in the terminal,
mv and other commands manage files.
And we know that each file has an i-node number, we can consider managing files through the i-node number.
First, we need to obtain the i-node number of the file. This can be obtained through the -i option of the ls command, or through ll-i.
The second step is to use the find command to pass the file name to the rm command.
e.g: To delete the garbled folder with node 12345, you can use the following command:
find ./ -inum 12345 -print -exec rm {} -rf /;
Note/; There cannot be less spaces after; otherwise an error will be reported.
That’s it for “How to Correctly Handle Garbled Files in Linux”, thank you for reading. If you want to know more about the industry, you can pay attention to the Linux e-book of Yisu Cloud website. The editor will output more high-quality practical articles for you!
The above is the detailed content of How to deal with Chinese characters in Linux that are different from Windows. For more information, please follow other related articles on the PHP Chinese website!