Hi I need to copy/move the contents of
data/tombstones
to sdcard/tombstones
我正在使用以下命令:
mv data/tombstones /sdcard/tombstones
"failed on 'tombstones' - Cross-device link"
但是我犯了錯誤。
Hi I need to copy/move the contents of
data/tombstones
to sdcard/tombstones
我正在使用以下命令:
mv data/tombstones /sdcard/tombstones
"failed on 'tombstones' - Cross-device link"
但是我犯了錯誤。
從xda的lbcoder和androidf要麽ums的darkxuser中解釋幾位
“'tombstones'失敗' - 跨設備鏈接”
這意味著您無法在引用不同文件系統上的文件的一個設備(文件系統)上創建硬鏈接。
This is an age-old unix thing. You can NOT move a file across a filesystem using most implementations of mv. mv is not made to copy data from device to device, it simply changes a file's location within a partition. Since /data and /sdcard are different partitions, it's failing.
Consider yourself f要麽tunate that 你有一個mv命令的SANE VERSION that doesn't try anyway -- some old versions will actually TRY to do this, which will result in a hard link that points to NOTHING, and the 要麽iginal data being INACCESSIBLE.
mv命令 不移動數據!!!它將HARDLINK移動到 數據。
如果要將文件移動到其他文件系統,則需要使用“cp”命令。復制文件以在不同的文件系統上創建它的SECOND COPY,然後使用“rm”命令刪除舊的文件系統。
一個簡單的移動命令:
#!/bin/bash
dd if="$1" of="$2"
rm -f "$1"
您將註意到“cp”命令返回true或false,具體取決於副本的成功完成,因此只有在文件成功復制後才會刪除原始文件。
#!/bin/bash
cat data/tombstones > sdcard/tombstones
rm data/tombstones
可以將這些腳本復制到PATH變量引用的某個位置並設置可執行文件。
If you need a 不同的界面 from adb you may move files using the FileExpl要麽er in DDMS View.
Side note:
您可以在以下情況下將文件移動到文件夾中:
root
;chmod
from adb
要麽
elsewhere to change permissions