使用shopt (shell option的简写?)开启extglob
shopt -s extglob
然后反选,删除file0之外的其他文件
rm !(file0)
本文标题:rm 保留一个文件(反选)
本文链接:https://www.haomeiwen.com/subject/eezwwctx.html
网友评论