DEV Community

Roy
Roy

Posted on

1

quote in ssh bash -c

alt text

    cmd="find $volumePath/data -maxdepth 1 -type f -name 'GRA_*.log' -print0 | xargs -0 -n 100 rm -v"
    # 双引号中bash子命令需要使用 `\"` 引用,否则会报错 "xargs argument line too long"
    ssh -p $sshPort $hostIP -- "bash -c \"$cmd\""
Enter fullscreen mode Exit fullscreen mode

https://serverfault.com/q/953087/576644

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more