1. How to delete the file name with "-"
Use--(2 bars)
#touch---%f-%t
#rm---%f-%t
Rm:remove regular empty file '-%f-%t '?
Use absolute Path and tab special file name
#rm/root/-%f-%t
Rm:remove regular empty file '/root/-%f-%t '?
2. Delete files that contain other special characters
For file names that contain other special characters, such as <>!*,
Available
"Escape character \ or" "double quotation mark
#touch ">123file"
#rm ">123file"
Rm:remove regular empty file ' >123file '?
#touch '!rul4 '
#rm \!rul4 If you use the TAB key here, the system will automatically help you adjust the syntax for correct deletion.
Rm:remove regular empty file '!rul4 '?
3. Delete the garbled file name that the system cannot make
First Use ls-i to find the inode of the file, and then use the Find command to delete
# LS-ILRT
100985-rw-r--r--1 TBCs users 0 APR 11:32-mxv9.log
100985 of the first column is the inode of the file, and the file can be deleted by executing the following command on the host
Find./-inum 100985-exec rm {} \;
This article is from the "Golden Mystery" blog, please be sure to keep this source http://191226139.blog.51cto.com/211244/1981392
Linux Delete special character files