linux使用技巧

1. cp到多个文件

  使用echo,管道符,xargs

  eg:创建redis集群  将redis.conf放入7000~7006文件夹下

  echo 7000/ 7001/ 7002/ 7003/ 7004/ 7005/ 7006/ | xargs -n 1 cp redis.conf

  此处的xargs 为管道符前的数据   -n 1 表示一次一个

猜你喜欢

转载自www.cnblogs.com/cyx-garen/p/9049885.html