linux shell 學習摘記(5)
《linux shell 指令碼程式設計攻略 (第2版)》 第五章 ”一團亂麻?沒有這回事“ 筆記
主要命令:
wget
,lynx
,curl
,圖片抓取指令碼
,網頁相簿生成指令碼
wget
wget -t 5 www.codeshold.me
,wget -t 0 www.codeshold.me
無限次嘗試,-O outfile.html
,-o out.log
- 可限速
--limit-rate 20k
, 可限制配額--quota 100m
或-Q 100m
- 斷點續傳
wget -c www.codeshold.me
- 映象整個網站
wget --mirror --convert-links www.codeshold.me
或者wget -r -N -k -l DEPTH URL
,其中-k
和--convert-links
指示wget將頁面的連結地址轉換為本地地址,-N
使用檔案的檔案戳 wget --user USERNAME --password PADDWD URL
wget http://10.108.255.249/cgi-bin/do_login --post-data "username=$name&password={TEXT}$pass&drop=0&type=1&n=100"i -q
lynx
curl
curl www.codeshold.me -o swf.html --progress
,--silent
不顯示進度資訊- 斷點續傳
curl URL/file -C offset
,curl -C -URL
(程式自己推斷出續傳的位置) - 參照頁(refer)可標誌使用者從哪個頁面到達當前頁面的,呈現的頁面可能會不一樣
curl --referer www.google.com www.codeshold.me
curl www.codeshold.me --cookie "user=wuzhimang;pass=mydream"
, 將cookie另存為一個檔案curl www.baidu.com --cookie-jar cookie.file
- 使用使用者代理(user agent),某些網站需特定的瀏覽器支援支援(如IE)
curl www.codeshold.me --user-agent "Mozilla/5.0"
使用者代理字串 - 新增頭部資訊
curl -H "Host: www.codeshold.me" -H "Accept-language: en" www.codeshold.me
- 限定
--limit-rate 20k
,--max-filesize bytes
- 認證
curl -u user:pass http://codeshold.me
,curl -u user http://10.108.255.249/
- 新增頭部
-I
或--head
- 命令列訪問Gmail (不能用的)此處有指令碼
POST請求
curl URL -d "XXX"
,wget URL --post-data "XXX" -O output.html
指令碼
相關文章
- 【Linux學習筆記29】shell指令碼基礎Linux筆記指令碼
- shell學習筆記筆記
- linux學習筆記-day5Linux筆記
- Linux學習之(shell展開)Linux
- Linux學習-shell基礎02Linux
- Linux命令和shell指令碼學習Linux指令碼
- linux shell陣列深入學習理解Linux陣列
- 前端學習 linux —— shell 程式設計前端Linux程式設計
- POSIX-shell學習筆記筆記
- 什麼是shell指令碼?Linux為什麼學習shell?指令碼Linux
- Linux學習之路(三)Shell指令碼初探Linux指令碼
- 【學習】Linux Shell指令碼程式設計Linux指令碼程式設計
- shell指令碼學習筆記-1指令碼筆記
- Linux核心學習筆記(5)– 程式排程概述Linux筆記
- 如何學習shell程式設計?Linux運維學習shell程式設計是什麼程式設計Linux運維
- linux學習day3——shell指令碼上Linux指令碼
- linux學習day4——shell指令碼中Linux指令碼
- MongoDB 學習筆記之常用 shell 命令MongoDB筆記
- shell學習
- Linux 學習筆記Linux筆記
- Linux運維要了解哪些shell技能?Linux學習入門Linux運維
- markdown使用摘記
- Linux 學習筆記--程式Linux筆記
- shell程式設計學習筆記(二):Shell中變數的使用程式設計筆記變數
- 學習Shell 教程
- Vue學習筆記5Vue筆記
- python學習記錄5Python
- Linux基礎學習-Docker學習筆記LinuxDocker筆記
- 強化學習-學習筆記5 | AlphaGo強化學習筆記Go
- progit摘錄筆記Git筆記
- 【精通比特幣】摘記比特幣
- Linux學習/TCP程式設計學習筆記LinuxTCP程式設計筆記
- linux學習筆記---一些命令學習Linux筆記
- 【Linux學習筆記】reboot命令Linux筆記boot
- Linux 學習筆記--程式管理Linux筆記
- spring-5學習筆記Spring筆記
- HTML5學習筆記HTML筆記
- [學習筆記 #5] 雜湊筆記
- Shell學習【運算子】