我试过了:
$ adb shell
# mkdir data/local/tmp/testjars
# exit
我以为 testjar 会在当前工作目录中创建,但那里什么都没有出现。我创建的这个文件夹(测试罐)放在哪里?
它将在
当前工作目录的任何目录中创建(在 adb shell 内部,而不是您的主机系统)。
例:
adb shell # execute shell, the following commands are executed inside it
cd /data/local/tmp # change the current working directory to the temp directory
mkdir data/local/tmp/testjars # create a new directory(ies)
执行上述命令后,testjars
目录的路径将如下:/data/local/tmp/data/local/tmp/testjars
。
所以最好做:
adb shell
cd /data/local/tmp # change the current working directory to where you want to create a subdirectory
mkdir testjars
您最终会得到一个目录/data/local/tmp/testjars
。
此外,如果您指定没有起始斜杠的路径/
,例如 mkdir test
,它是在当前工作目录中创建的。如果您使用起始斜杠指定它,例如 mkdir /test
,它是在根目录中创建的(如果您有权这样做)。