首页 / DevOps xargs 用法点滴 PHPor 的blog 2011-07-14 23:55:10 累计浏览 4,243 次 稍后读 标签 Linux命令 Shell脚本 xargs 管道 如果输出的参数是写在执行命令的结尾的,则: echo f1 f2 f3| xargs -n 1 ls 如果要将文件重命名,则: echo f1 f2 f3| xargs -i -n 1 mv {} {}.bak 同分类推荐文章 NGINX Gateway Fabric 2.8: IP allow and deny lists, passive health checks, and cookie-based session persistence (2026-11-14 01:10:02) NGINX Ingress Controller 5.7: HTTP/2 to your upstreams, Opaque Secrets, and cert-manager challenges behind HTTPS redirects (2026-11-14 00:10:02) Hexo 文章一键发布到微信公众号 (2026-11-13 19:10:02) 查看更多 DevOps 文章 → 建议继续学习 28个Unix/Linux的命令行神器 (累计阅读 17,183) find命令的一点注意事项 (累计阅读 12,370) Linux shell脚本使用while循环执行ssh的注意事项 (累计阅读 8,492) 较安全的rm脚本 (累计阅读 6,276) Bash如何取得当前正在执行的脚本的绝对路径? (累计阅读 6,253) nslookup通往DNS的桥梁 (累计阅读 6,187) xargs命令少为人知的细节 (累计阅读 5,919) sed命令使用 (累计阅读 4,668) 利用for + grep awk 解决grep + xargs (累计阅读 4,122) 后台脚本挂起的几种原因 (累计阅读 3,813) « 上一篇 通过『iostat -dx 1』命令监控IO性能 下一篇 » 面向对象的Shell脚本