ADB (Android Debug Bridge) is a command-line utility that allows you to communicate with Android devices from your computer. Among other things, you can use ADB to copy file(s) to and from Android devices. As of this writing, ADB does not support wildcards to push or transfer multiple files (e.g., *.jpg) to Android devices.
So for example, the following will not work.
If you would like to copy or transfer multiple files to an Android device, use the following trick.
First create a temporary directory, and copy to that directory all files that you want to transfer to your Android device. Then using ADB, push that entire temporary directory to the Android device. ADB will then push all individual files in the directory to the destination location of your Android device. For example:
$ cp *jpg tmp_dir
$ adb push tmp_dir /sdcard/my_photo
push: tmp_dir/001.jpg -> /sdcard/my_photo/001.jpg push: tmp_dir/002.jpg -> /sdcard/my_photo/002.jpg push: tmp_dir/003.jpg -> /sdcard/my_photo/003.jpg push: tmp_dir/004.jpg -> /sdcard/my_photo/004.jpg . . . .
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!
Latest posts by Dan Nanni (see all)
- How to install Suricata intrusion detection system on Linux - September 3, 2015
- How to switch from NetworkManager to systemd-networkd on Linux - August 31, 2015
- How to set up a system status page of your infrastructure - August 25, 2015