Using find - Deleting all files/directories (in Linux ) except any one

后端 未结 11 1067
野趣味
野趣味 2021-02-02 15:12

If we want to delete all files and directories we use, rm -rf *.

But what if i want all files and directories be deleted at a shot, except one particular fi

11条回答
  •  清歌不尽
    2021-02-02 16:06

    you need to use regular expression for this. Write a regular expression which selects all other files except the one you need.

提交回复
热议问题