删除名称中包含特殊字符的文件
Removing files that have special characters in their name
如何删除具有特定名称的文件。例如,我的文件名为
This File Example (England).txt
This File Example (US).txt
我想删除名称中带有 (England) 的所有文件。
所以我试过了,
rm -f "*(Eng*"
但是没用。是否需要特殊字符?
应该这样做:
rm -f ./*'(England)'*
逃避特殊的:
rm -f *\(Eng*
^
或者对文字部分使用单引号:
rm -f *'(Eng'*
^ ^
如何删除具有特定名称的文件。例如,我的文件名为
This File Example (England).txt
This File Example (US).txt
我想删除名称中带有 (England) 的所有文件。
所以我试过了,
rm -f "*(Eng*"
但是没用。是否需要特殊字符?
应该这样做:
rm -f ./*'(England)'*
逃避特殊的:
rm -f *\(Eng*
^
或者对文字部分使用单引号:
rm -f *'(Eng'*
^ ^