Recently I needed to move my file from my One Plus (yes – I’m back to iOS). For this move I needed to transfer my previous images / files from the android phone to my computer.
The only thing is each time I tried to use Android File Transfer, it stalls in the middle of the progress after copying few files. I thoguht ok, let’s go back to CLI, so ADB was an obvious backup plan; however the last did not sustain as well. The phone keeps disconnecting and I got frustrated with this buggy design of both. (@Google – Why is this OK?)
Turns out that CLI is indeed a life saver especially for a linux user like me. What I did is really simple and effective.
The idea:
Run scp
in adb shell
connect back to your mac / linux box (Windows users you will find a way too – SFTP server?)
The implementation:
1 2 3 4 |
[...] user:folder# cd /mnt/sdcard/DCIM user:folder# scp -rp ./* user@ip-addr:~/BackUpFolder/ [...] |
Bonus:
scp has many options, we used -r and -p because:
-r means recursive
-p preserves modification times, access times, and modes from the original file.
Leave a reply