亚行拔多个文件 [英] adb pull multiple files
问题描述
什么是用拔多个文件的最好方法
亚行拉
我有我的 / SD卡/
25的文件名称如下:
gps1.trace
gps2.trace
...
gps25.trace
通配符不工作的:
亚行拉/sdcard/gps*.trace。
您可以使用 xargs的
和亚行LS的结果
命令接受通配符。这使您可以复制多个文件。有从的输出只是一个小问题,亚行LS
命令已被过滤掉。烦人的亚行LS的输出
命令包括换行控制字符,你可以使用 TR
删除
例如:
亚行外壳LS /sdcard/gps*.trace | TR'\ r'''| xargs的-n1亚行拉
或者在Windows(因为换行字符是不同的),
亚行外壳LS /sdcard/gps*.trace | TR\ñ\ r| xargs的-n1亚行拉
What is the best way to pull multiple files using
adb pull
I have on my /sdcard/
25 files with following name:
gps1.trace
gps2.trace
...
gps25.trace
Wildcard does not works:
adb pull /sdcard/gps*.trace .
You can use xargs
and the result of the adb ls
command that accepts wildcards. This allows you to copy multiple files. There's just a small problem from the output of the adb ls
command that has to be filtered out. Annoyingly the output of the adb ls
command includes line-feed control characters that you can remove using tr
.
Example:
adb shell ls /sdcard/gps*.trace | tr '\r' ' ' | xargs -n1 adb pull
or, on Windows (since the newline characters are different),
adb shell ls /sdcard/gps*.trace | tr "\n\r" " " | xargs -n1 adb pull
这篇关于亚行拔多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!