ADB命令无法执行,如果路径中有空格 [英] adb command fail to execute if path contain spaces

查看:2277
本文介绍了ADB命令无法执行,如果路径中有空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想删除使用ADB命令文件。但该文件包含空格。因此,亚行命令读取文件名的一半,直到空格后抛出一个错误。有没有办法来解决这个问题。我执行下面的ADB命令

I am trying to delete the file using adb command. But the file contain spaces. So adb command throws an error after reading half of the file name till space. Is there a way to overcome this issue. I am executing following adb command

当我执行

adb shell rm /sdcard/samsung_Nexus S_converter.xml

错误消息:RM失败/ SD卡/ samsung_Nexus,没有这样的文件或目录

Error message: rm failed for /sdcard/samsung_Nexus, No such file or directory

如何过当我执行:

adb shell rm /sdcard/samsung_Nexus_S_converter.xml

文件删除成功

我搜索了此解决方案,如果有任何解决方法。如何过我想不出狼狈不堪。

I searched for solution for this, if there is any workaround. How ever I couldnt find any.

推荐答案

由于您使用的命令行,你需要知道使用(反斜杠,如空间的特殊字符前),空格必须转义,所以,你的情况下,这应该工作太:

Since you are using command line, you need to know that spaces must be escaped by using (backslash before the special character like "space"), so, in your case this should work too:

亚行外壳RM / SD卡/ samsung_Nexus \\ S_converter.xml

adb shell rm /sdcard/samsung_Nexus\ S_converter.xml

希望它帮助!

祺!

这篇关于ADB命令无法执行,如果路径中有空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆