From 81d58b3c4046b224c2490b196641cf8e53672bf1 Mon Sep 17 00:00:00 2001 From: noodles2hg <57032282+z-anshun@users.noreply.github.com> Date: Fri, 4 Mar 2022 00:30:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20ls=20=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A4=BA=E4=BE=8B=20(#337)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 应该为`ls *.jpg | xargs -n1 -I{} cp {} /data/images` --- command/xargs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/xargs.md b/command/xargs.md index e511cf5189..9f5a2357f6 100644 --- a/command/xargs.md +++ b/command/xargs.md @@ -102,7 +102,7 @@ cat arg.txt | xargs -I {} ./sk.sh -p {} -l 复制所有图片文件到 /data/images 目录下: ```shell -ls *.jpg | xargs -n1 -I cp {} /data/images +ls *.jpg | xargs -n1 -I{} cp {} /data/images ``` #### 结合 find 命令使用