Skip to content

Instantly share code, notes, and snippets.

@laprasdrum
Created November 2, 2020 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laprasdrum/2d4f0a7fb1d5f07a458a2f790a3e0686 to your computer and use it in GitHub Desktop.
Save laprasdrum/2d4f0a7fb1d5f07a458a2f790a3e0686 to your computer and use it in GitHub Desktop.
ScreenShot for smartphone with timestamp name
# iOS
# use libmobiledevice
# https://github.com/libimobiledevice/libimobiledevice
# https://formulae.brew.sh/formula/libimobiledevice
# save as 'ios_20200401_11.09.21.png'
$ date +%Y%m%d_%H.%M.%S | xargs -I{} sh -c 'idevicescreenshot /path/to/screenshot/ios_{}.png'
# Android
# save as 'android_20200401_11.09.21.png'
$ date +%Y%m%d_%H.%M.%S | xargs -I{} sh -c 'adb exec-out screencap -p > /path/to/screenshot/android_{}.png'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment