Home  >  Q&A  >  body text

Centos里如何批量确定选择?

CENTOS 里我批量做了个操作,然后不停的提示要求确定。该怎样批量确定啊?

顺便问下,我想拷贝当前目录的所有文件到父目录, cp -Rf * ../ 这样写对吗?

黄舟黄舟2732 days ago634

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-27 09:03:21

    Found the solution - modify the command alias.

    Edit vi ~/.bashrc
    Comment out the line cp='cp -i' and save the configuration to take effect after restarting the server.

    Check the alias after restarting. There is no cp='cp -i'. In this way, when overwriting files, use the -Rf parameter and you will not be asked constantly.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-27 09:03:21

    Add a backslash before the cp command, for example:

    \cp -Rf csr/ csr.bak

    reply
    0
  • Cancelreply