Chapter 07 Command Line Operations(3)

 时间:2026-05-25 16:05:52

1、Another good use of find is being able to run commands on the files that match your search criteria. The -exec option is used for this purpose.

To find and remove all files that end with .swp:$ find -name "*.swp" -exec rm {} ’;’

The {} (squiggly brackets) is a place holder that will be filled with all the file names that result from the find expression, and the preceding command will be run on each one individually.

Note that you have to end the command with either ‘;’ (including the single-quotes) or \; Both forms are fine.

One can also use the -ok option which behaves the same as -exec except that find will prompt you for permission before executing the command. This makes it a good way to test your results before blindly executing any potentially dangerous commands.

Chapter 07 Command Line Operations(3)

  • Chapter 07 Command Line Operations(2)
  • power settings command-line tool已停止工作
  • 情深几许chapter1
  • 解决安装错误Command line option syntax error
  • mac,如何安装command line tools
  • 热门搜索
    后空翻怎么练 怎么插入目录 薛佳凝和胡歌怎么回事 vlookup怎么用详细步骤 鱼刺卡喉咙怎么办 没有身份证怎么坐飞机 诺优能奶粉怎么样 大骨头怎么做好吃 社保怎么查 入党申请书怎么写