Linux几个重要命令

1.reboot命令 用于重启系统
2.poweroff命令 用于关闭系统
//均涉及硬件资源的管理权限,因此默认只有root管理员才可以管理电脑。
3.wget
用于在终端中下载网络文件
格式为 wegt [参数] 下载地址
Linux几个重要命令_第1张图片
在下载https站点时:

ERROR: certificate common name *.c.ssl.fastly.net‘ doesn‘t match requested host namebootstrap.pypa.io‘.
To connect to bootstrap.pypa.io insecurely, use `–no-check-certificate‘.
无法建立 SSL 连接。
wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
因为wget在使用HTTPS协议时,默认会去验证网站的证书,而这个证书验证经常会失败。加上"–no-check-certificate"选项,就能排除掉这个错误。

root@iZwz9fknhnmtjjrvzz2oubZ:~# wget https://www.linuxprobe.com/docs/LinuxProbe.pdf
wget: /usr/local/openssl/lib/libcrypto.so.1.0.0: no version information available (required by wget)
wget: /usr/local/openssl/lib/libssl.so.1.0.0: no version information available (required by wget)
wget: /usr/local/openssl/lib/libssl.so.1.0.0: no version information available (required by wget)
--2019-01-21 21:55:57--  https://www.linuxprobe.com/docs/LinuxProbe.pdf
Resolving www.linuxprobe.com (www.linuxprobe.com)... 101.37.183.142, 101.37.183.145, 101.37.183.143, ...
Connecting to www.linuxprobe.com (www.linuxprobe.com)|101.37.183.142|:443... connected.
ERROR: cannot verify www.linuxprobe.com's certificate, issued by ‘CN=Encryption Everywhere DV TLS CA - G1,OU=www.digicert.com,O=DigiCert Inc,C=US’:
  Unable to locally verify the issuer's authority.
To connect to www.linuxprobe.com insecurely, use `--no-check-certificate'.
root@iZwz9fknhnmtjjrvzz2oubZ:~# wget --no-check-certificate https://www.linuxprobe.com/docs/LinuxProbe.pdf
wget: /usr/local/openssl/lib/libcrypto.so.1.0.0: no version information available (required by wget)
wget: /usr/local/openssl/lib/libssl.so.1.0.0: no version information available (required by wget)
wget: /usr/local/openssl/lib/libssl.so.1.0.0: no version information available (required by wget)
--2019-01-21 22:16:44--  https://www.linuxprobe.com/docs/LinuxProbe.pdf
Resolving www.linuxprobe.com (www.linuxprobe.com)... 101.37.183.142, 101.37.183.146, 101.37.183.145, ...
Connecting to www.linuxprobe.com (www.linuxprobe.com)|101.37.183.142|:443... connected.
WARNING: cannot verify www.linuxprobe.com's certificate, issued by ‘CN=Encryption Everywhere DV TLS CA - G1,OU=www.digicert.com,O=DigiCert Inc,C=US’:
  Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 20105266 (19M) [application/pdf]
Saving to: ‘LinuxProbe.pdf’

LinuxProbe.pdf                           100%[================================================================================>]  19.17M  26.2MB/s    in 0.7s    


我们可以使用wget命令递归下载网站内所有页面数据以及文件,下载完后会自动保存在当前路径下一个名为 http://www.linuxprobe.com 的目录中

wget -r -p http://www.linuxprobe.com

更详细wget资料:https://www.cnblogs.com/wuheng1991/p/5332764.html

你可能感兴趣的:(Linux,wget)