コマンド "ADB PULL / SDCARD /" MY Android Phoneの内部メモリのすべての内容を現在のローカルディレクトリにコピーできます(および「ADB PULL / MNT / EXTSDCARD /」は外部SDと同じです。カード)。しかし、そのコマンドは常にすべてをコピーします。
新規ファイルと変更されたファイルのみをコピーする方法はありますか? (新しい日付を持つファイル)
コマンド "ADB PULL / SDCARD /" MY Android Phoneの内部メモリのすべての内容を現在のローカルディレクトリにコピーできます(および「ADB PULL / MNT / EXTSDCARD /」は外部SDと同じです。カード)。しかし、そのコマンドは常にすべてをコピーします。
新規ファイルと変更されたファイルのみをコピーする方法はありますか? (新しい日付を持つファイル)
With the command "adb pull /sdcard/" I can copy all the contents of the internal memory of my Android phone into my current local directory (and "adb pull /mnt/extSdCard/" does the same with the external SD card). But that command always copies everything, even files I already have stored locally.
Is there any way to copy only new and modified files? (files with a newer date)
SS-3-14159265358979323846433に記載されているようにフラグがありませんが、最初にファイルのリストを取得してから、ローカルファイルが一致するかどうかを確認する必要があります。私はそれのために少しスクリプトを書いた:
<事前> <コード> adb pull0リモートフォルダ<コード> とローカルフォルダ<コード> <コード> lfolder をあなた自身の選択の場所に調整します。
As described by ss-3-1415926535897932384626433 there is no flag, but you have to get a list of files first and then check if your local files match. I wrote a little script for it:
#!/bin/sh rfolder=/sdcard/DCIM/Camera lfolder=Camera adb shell ls "$rfolder" > android.files ls -1 "$lfolder" > local.files rm -f update.files touch update.files while IFS= read -r q; do # Remove non-printable characters (are not visible on console) l=$(echo ${q} | sed 's/[^[:print:]]//') # Populate files to update if ! grep -q "$l" local.files; then echo "$l" >> update.files fi done < android.files script_dir=$(pwd) cd $lfolder while IFS= read -r q; do # Remove non-printable characters (are not visible on console) l=$(echo ${q} | sed 's/[^[:print:]]//') echo "Get file: $l" adb pull "$rfolder/$l" done < "${script_dir}"/update.files
Adjust the remote folder rfolder
and the local folder lfolder
to locations of your own choice.
adb-sync - すべての尋ねられてもっと多くのことができる小さい、強力なPythonスクリプト... https://github.com/google/adb-sync
adb-sync - small, yet powerfull python script that can do all your asked and more... https://github.com/google/adb-sync
adb pull3
は、引っ張るための旗を提供していないようです選択されたファイル
回避策として行うことができます。 99887766544334
を使用して、選択したファイルを一時的な場所にコピーしてから、その場所からすべてのファイルを引いてください。
更新:
99887766544355
unix shellコマンドを使用して、後続の実行時に変更されたファイルのみを使用できます。 99887766554336
フラグを使用して、必要な場合はサブディレクトリの再帰的で使用することもできます。
adb pull
doesn't seem to provide a flag to pull selected files.
As a workaround, you can do this: Use adb shell [Unix shell command]
to copy selected files to a temporary location and then pull all files from that location.
Update:
You can use cp -u [source] [destination]
unix shell command to copy only modified files on subsequent run. You can also use -r
flag to use it on subdirectories recursive, if its required.
© 2022 cndgn.com All Rights Reserved. Q&Aハウス 全著作権所有