Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用linux命令行在特定网页上加载图像?_Linux_Image_Curl_Page Load Time - Fatal编程技术网

如何使用linux命令行在特定网页上加载图像?

如何使用linux命令行在特定网页上加载图像?,linux,image,curl,page-load-time,Linux,Image,Curl,Page Load Time,最近我一直关注页面加载时间,我关注的是在网页上加载某些图像的时间。让我困惑的是如何使用linux命令行来实现这一点。cURL有帮助吗?如果是,我该怎么办?或者还有其他方法吗 任何建议和解决方案都将不胜感激。在桌面上或任何您想要的地方创建一个新文件。。比如curl-format.txt 将其粘贴到此文件中: time_namelookup: %{time_namelookup}\n time_connect: %{time_connect}\n time_appc

最近我一直关注页面加载时间,我关注的是在网页上加载某些图像的时间。让我困惑的是如何使用linux命令行来实现这一点。cURL有帮助吗?如果是,我该怎么办?或者还有其他方法吗


任何建议和解决方案都将不胜感激。

在桌面上或任何您想要的地方创建一个新文件。。比如curl-format.txt

将其粘贴到此文件中:

    time_namelookup:  %{time_namelookup}\n
       time_connect:  %{time_connect}\n
    time_appconnect:  %{time_appconnect}\n
   time_pretransfer:  %{time_pretransfer}\n
      time_redirect:  %{time_redirect}\n
 time_starttransfer:  %{time_starttransfer}\n
                    ----------\n
         time_total:  %{time_total}\n
提出请求:

curl -w "@curl-format.txt" -o <path/to/the/file> -s "webpagelink.com"
curl-w“@curl-format.txt”-o-s“webagelink.com”

idk您想要什么。。是拍摄图片的时间还是完整网页的时间?是的,我只是想要拍摄图片的时间。此外,如果我只是在一个网站上放一张图片,然后使用
curl
来获取该网站的加载时间,那么可能不是确切的图片加载时间。那么
curl
是否可以做到这一点?如果是,怎么做@塞姆拉