使用wget查看在线文件的md5
Use wget to check md5 of online file
我正在尝试在 Mac 终端中使用此命令在线检查文件的 MD5:
wget https://player.vimeo.com/external/blahblah.sd.mp4?s=blahblah&profile_id=165 | md5 | awk '{print }'
但是 MD5 散列是即时返回的。它实际上并不是先下载文件。我在这里错过了什么?
?
和 &
是 shell 个元字符。
您的代码将 运行
wget https://player.vimeo.com/external/blahblah.sd.mp4?s=blahblah &
(在后台),然后
profile_id=165 | md5 | awk '{print }'
第 1 步引用 URL:
wget 'https://player.vimeo.com/external/blahblah.sd.mp4?s=blahblah&profile_id=165' | md5 | awk '{print }'
下一个问题是 wget
不写入标准输出,所以此时您可能会得到一个名为 blahblah.sd.mp4?s=blahblah&profile_id=165
的文件。
这可以通过 the -O
option 更改:
wget -O - 'https://player.vimeo.com/external/blahblah.sd.mp4?s=blahblah&profile_id=165' | ...
我正在尝试在 Mac 终端中使用此命令在线检查文件的 MD5:
wget https://player.vimeo.com/external/blahblah.sd.mp4?s=blahblah&profile_id=165 | md5 | awk '{print }'
但是 MD5 散列是即时返回的。它实际上并不是先下载文件。我在这里错过了什么?
?
和 &
是 shell 个元字符。
您的代码将 运行
wget https://player.vimeo.com/external/blahblah.sd.mp4?s=blahblah &
(在后台),然后
profile_id=165 | md5 | awk '{print }'
第 1 步引用 URL:
wget 'https://player.vimeo.com/external/blahblah.sd.mp4?s=blahblah&profile_id=165' | md5 | awk '{print }'
下一个问题是 wget
不写入标准输出,所以此时您可能会得到一个名为 blahblah.sd.mp4?s=blahblah&profile_id=165
的文件。
这可以通过 the -O
option 更改:
wget -O - 'https://player.vimeo.com/external/blahblah.sd.mp4?s=blahblah&profile_id=165' | ...