Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jemygraw/e5752c14bba6e23ff825 to your computer and use it in GitHub Desktop.
Save jemygraw/e5752c14bba6e23ff825 to your computer and use it in GitHub Desktop.
shell - get the file content length via http HEAD request
curl -Is 'http://dbsq-video-base.oss-cn-qingdao.aliyuncs.com/base/1167_9da187a7a191431db943a9a5a6fec6f4.mp4' | grep 'Content-Length' | awk -F ': ' '{print $2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment