In Linux systems, many metacharacters, such as semicolons (semicolon), spaces (space), backslashes (backslash), dollar signs (dollar sigh), question marks (question mark), and asterisks (asterisk) are often interpreted as commands ,-(dashes) or--the option to be interpreted as a command, you can copy, move, delete a band-or--file in the following ways:
1. First, create a file, create a prefix band-or--the file cannot be directly used by the touch command because it will be interpreted as an option for the command, so it has to be created in an append form:
[[email protected] tmp]# echo >-foo.txt[[email protected] tmp]# echo >-bar.txt
After creating the file, if you use the LS command to list the file by using the wildcard character, the following error will appear:
[Email protected] tmp]# ls-l *.txtls:invalid option--'. ' Try ' ls--help ' for more information.
You need to include the-delimiter option in the command, separating the options and parameters:
[Email protected] tmp]# ls-l--*.txt-rw-r--r--. 1 root root 2192022 Jan 9 09:03 137k.txt-rw-r--r--. 1 root root 1 Jan 9 16:36-bar.txt-rw-r--r--. 1 root root 1 Jan 9 16:36-foo.txt
corresponding, the command to copy and move the file is used as follows:
[email protected] tmp]# CP---foo.txt/opt/
[Email protected] tmp]# MV---bar.txt/opt/
This delimiter is also valid for the Rmdir,rm,ls command.
This article is from the "Ordinary Road" blog, please be sure to keep this source http://linjohn.blog.51cto.com/1026193/1601288
How Linux moves a copy deletes a file with a special literal character prefix (-,--,;)