自由軟體系統應用
  • 自由軟體系統應用筆記
  • Ubuntu桌面
    • 使用ubuntu20.04
    • 調整sudoers
    • 使用的 dns resolver
    • 架設DNS Server
    • 區域網路掃描
    • 安裝kazam 錄影截圖
    • 轉檔電腦中的圖片成為其他格式
    • docker nomachine 桌面
    • Youtube Download GUI
    • 影音編輯
    • OCR
    • PDF tools
    • Wii
    • RetroPie
    • 網路工具
      • 伺服器
      • pxe server
      • X11vnc 與 novnc
    • 如何將Ubuntu安裝轉換為滾動版本
  • gitHub
    • Gdevelop
    • git 拉回Repositories
    • gitBook應用
    • 取回 GitBook
    • git web hosting
  • docker 從安裝到應用(入門篇)
    • 環境建構與基礎觀念
    • 虛擬機器與容器之差異
    • 安裝 docker
    • 管理 HOST 機
    • 啟用HOST機的/etc/rc.local
    • 設定HOST的固定IP
    • 映像檔
    • 建立容器
    • 啟動容器
    • 操作映像檔
    • 容器的匯出與匯入
    • docker的終端管理器
    • docker容器系統資源監測終端
    • WebUI : portainer
    • portainer簡易操作(一)
    • portainer簡易操作(二)
    • docker volume
    • docker Node-Red
    • 安裝docker-compose
    • docker dns Server
      • Bind DNS SERVER設定
      • 安裝apache2
    • docker快速建立FTP+SAMBA
    • docker NFS Server
    • docker DHCP Server
    • 下載Youtube
    • 快速架設LAMP環境
    • 安裝xoops
    • docker mosquitto mqtt server
    • nginx proxy
    • nginx load-balancer
    • 快速系統監控系統
    • nagios
    • 快速架設nextcloud私有雲
    • 為私有雲建立raid磁碟
    • 把nextcloud的資料映射到raid
    • 使用docker-compose整合MySQL
    • 建立基礎的Dockerfile
    • 使用Dockerfile建立用於xoops的images
    • 使用docker-compose建立xoops網站
    • x11docker
      • firefox app
    • 上傳你的映像檔docker push
    • 移除docker hub上的images
    • Plex Media
    • transfer.sh從命令行輕鬆共享文件
    • CockPit-docker
    • aria2
    • Grafana
    • Docker的網路
    • Macvlan
    • 使用MacVlan(建議使用)
    • 建立HOST主機橋接網路
    • pipework
    • 手動建立veth pair
    • 程式開發環境-scratch3
    • Scrcpy
    • docker storage drivers
    • x11docker + docker gui 遠端桌面
    • 附錄
    • Bacula
    • Untitled
  • Docker Swarm
    • 開工設置HOST1
    • 將工作節點添加到cluster
    • 使用docker swarm啟動Web服務
    • 對外服務
    • 進階功能
    • 退出cluster
    • 問題與解決
  • k8s
    • 概念
    • 使用Ubuntu單機測試
    • 基本
    • Install 原生 minikube
    • 對外公開應用
    • 更新應用
    • Rollback
    • 使用Rancher OS
  • 儲存與AIoT
    • UserLand
    • Termux
      • 常用快捷鍵
      • 取得當前的shell環境
      • 美化shell介面
      • 取得儲存權限
      • 啟動 SSH Server‌
      • SSH Xforwarding
      • Rsync over SSH
      • 使用putty-tools
      • 安裝基本工具
      • darkhttpd建立簡易網頁檔案服務
      • 安裝youtube-dl 與 you-get 工具下載線上影片
      • 使用Bash-Snippets 的 ytview
      • 播放音樂
      • 開啟影片
      • 檔案管理 Caddy
      • 檔案管理 cloudcmd
      • 安裝Node-Red工具
      • Node-Red存取保護
      • Termux + mosquitto +Node-RED 讓手機更強大
      • node mqtt
      • 把vim變成IDE
      • 使用nvim
      • 在Termux上的Python程式
        • Python MQTT
        • Youtube 下載工具
        • ipython
      • 在Termux上安裝使用golang工具
        • 安裝transfer.sh
      • Grafana
      • 開機啟動
      • 設定mosquitto Server
      • 安裝rclone
      • 安裝nextcloud
      • 終端機外觀
      • 安裝BroadLink套件
      • 使用 node-red BroadLink
      • 使用圖形流程取得手機空間
      • Line notify
      • telegram-cli 通訊
      • 使用Termux-API
      • 掃描區網
      • 安裝Termux-blutooth
      • Actions on Google
      • MongleDB
      • 原生桌面
      • 安裝Linux桌面
        • 中文化
        • 中文輸入
        • Rsync
        • VIM 與 plugins
        • MongoDB
        • SSH -X 登入
      • 寫nodejs小工具
        • 使用express+ejs框架
        • Nodejs MVC設計模式
        • 連接mongodb
        • 純 javascript 資料庫
    • 樹梅派
      • docker
      • 使用遠端linux x11docker 顯示桌面
      • 安裝node-red
      • 整合樹梅派GPIO
      • MQTT Server
      • Cockpit 管理系統
      • Samba服務
      • 藍芽iBeacon
      • Lakka
      • Retroarch
      • RetroPie
      • 樹莓派4B gpio readall 出現Oops - unable to determine board type... model: 17
      • GPIO LED
    • 樹梅派ZeroW
      • 安裝系統
      • 安裝簡易桌面
    • OpenMediaVault 企業用NAS實戰
      • 基本與安全設定
      • 建立安全儲存的磁碟區
      • 內部網路較時服務
      • cockpit系統管理
      • 啟用/etc/rc.local
      • SMART 磁碟健康檢測
      • cpu 溫度
      • 測試災難復原
      • 系統備份
      • 系統損壞災難復原
      • 使用rsync復原系統到新磁碟
      • 運作的系統同步到備用系統
      • 磁碟讀寫測試與速度調整
      • 基本分享 Samba
      • Share NFS
      • Rsync Server
        • 詳解 rsync server
      • 測試NetWork Raid
      • OMV Extra
        • Diskstats
      • 工具 docker
      • 工具 cloudcmd
      • 工具 Heimdall
      • 工具Syncthing
      • 工具 Duplicati
      • firewalld防火牆
      • 循序Rsync
      • 工具 rclone
      • 工具 UrBackup
      • 工具 aaPanel
      • 工具 minio
      • 通知
      • 一些常用磁碟管理指令
      • 附錄:日常維護SOP
      • 真實案例處理
      • 真實處理2
      • 一直收到SparesMissing event
      • Resource問題
      • 附錄:把11顆raid6 reshaped為10顆
      • 附錄:我的powerNAS
      • 附錄:自己架設NAS的理由
      • 系統升級
    • FreeNAS
      • 語言與時間
      • 建立Pool
      • NFS共用
      • SAMBA共用
      • Share iSCSI
    • PomoxVE
      • Untitled
      • 靈活的存儲
      • 整合備份和還原
      • HA 、橋接網路與整合防火牆
      • 登入與修正
      • 增加儲存
      • 下載iso
      • 下載範本
      • 修改虛擬機名稱
      • 建立LXC容器
      • 將lxc容器轉換為範本
      • 從範本複製lxc容器
      • 將容器備份
      • LXC run docker
      • 建立lxc範本(with docker)
      • lxc + docker samba服務測試
      • 建立DNAT
      • 磁碟初始化
      • 建立ZFS pool
        • 建立zpool disk
      • ZFSpool rename
      • 將主機上的目錄綁定給LXC容器
      • 將主機上的目錄綁定給LXC容器中的docker
      • 移除ZFS pool
      • Proxmox VE + OpenMediaVault使用lxc
      • 資料中心儲存(nfs)
      • 儲存(samba)
      • 光纖網路設定
      • 建立叢集
        • 使用Ceph與HA
        • cockpit 管理叢集
        • 以VirtualBox模擬pve叢集
      • Ceph Object Storage
        • Ceph需要大量記憶體
        • OSD的pg_num與CephFS
        • Ceph物件儲存基本
        • 系統備註
        • 如何移除 osd
        • 清理osd 磁碟
        • 列出使用的磁碟與格式化磁碟
        • HEALTH_WARN :too few PGs per OSD (12 < min 30)
      • 安裝VM到ceph,並執行遷移
      • 移除Ceph
      • HA
      • 簡易桌面與音效
      • 無線網路與nat設定
      • 安裝 Windows10 VM
      • 虛擬機實戰應用:建構ceph除存叢集
        • Cockpit管理工具
        • 安裝ceph儲存叢集
      • 附錄
        • 加入 cockpit 管理
        • LVM 檔案系統處理
        • 掛載其他pve的pve-lvm
        • 移除叢集
        • 解決debian10 lxc update後無法重新啟動的問題
        • 刪除內建的 LVM thin:local-lvm,改用ZFS
        • 建立ZFS-RaidZ2的ZFS
        • 使用 cockpit 網路設定 bond
        • iperf 測速
        • 舊文件回顧:lxc的VE應用
        • ceph 指令
        • osd 的 scrub
    • PromoxVE中心企業及伺服器架設實戰
      • 超融合私有雲實施計畫
      • 共享儲存Ceph
      • Ceph核心元件
      • 安裝NetDATA工具
      • 虛擬機無法啟動問題
    • Linux 系統大小事
      • linux已飛入尋常百姓家
      • Linux CLI
        • 美化 Shell
        • 登出與關機
        • Inxi:功能強大的獲取Linux系統信息的命令行工具
        • mv移動與改名
        • 登入:Linux 基本的語法
        • 用 screen 管理多終端
        • rename單次及批次修改檔案名稱
        • 檢查區域網路IP使用:arp-scan
        • 使用者管理
        • 檢視歷史命令
        • 使用管線
        • PV的使用
        • 終端機錄像:asciinema
      • 系統CPU Load Average
      • 系統調整,儘量不使用swap
      • speedtest-cli 測速
      • 磁碟讀寫基本測試
      • 使用NTFS磁區
      • 安裝nodejs環境
        • 全域安裝的node_modules
      • 使用bluetoothctl管理藍芽裝置
      • Snap 安裝軟體
        • Snap Install 安裝軟體
      • 系統時間timedatectl
      • 自動較時chrony
      • 關於mail
      • 檢測WIFI
        • 檢測wifi的有用工具
        • 使用watch+nmcli監看wifi訊號的變化
        • 監控無線網路
        • 檢查wifi使用802.11xx
        • 找出你的psk密碼
      • 快速修改主機名稱
      • Shell Script
        • Bash Script參考:有用BASH腳本的集合
        • Bash Script參考:bench.sh
        • 自己寫吧!Hello,Bash:echo
        • Hello,Bash:printf
        • "Debug" mode
        • 變數和環境變數
        • 用戶輸入
        • 註釋多行
        • for 迴圈 1~100
        • 數位時鐘(while迴圈)
        • 取得本機的IP與連線網際網路的IP(NAT)
        • 找出你的DHCP Server
        • 使用curl測試連接某網站的速度
        • host + whois找出某網站的資訊
        • 簡易網站
        • RSYNC SERVER
      • 安裝vifm
      • Nmap應用
      • Fail2ban
      • 讓Cron的工作不寄信
      • use ZFS
      • 掛載其他系統的ZFS磁碟
      • 不能ping的主機,使用 arping
      • transfer.sh從命令行輕鬆共享文件
      • console 應用
      • SYN_RECV的奇怪連線
      • 可以測試的 v4 與 v6
    • Mozilla WebThings Gateway
      • Add-ons
      • Untitled
    • Ansible
    • 使用FlatPack安裝Retroarch
    • 網路大小事
      • 系統優化
      • 系統安全:iptables與 ip6tables
        • 攻擊測試工具
        • iptables
        • 實驗環境
        • iptable與NAT路由器
      • 系統監控
      • Arp攻擊
    • MongoDB Community
      • on Ubuntu 安裝與移除
      • on Debian 安裝與移除
      • on Debian 基本使用
      • 自訂資料庫與port
    • 監控工具之:Grafana
    • CoreOS
      • Untitled
      • 安裝到硬碟
      • 遠端登入
  • 線上工具
    • Google for Education 學習永不止息
    • Google ClassRoom + Meet
    • mqtt server
      • mqtt.one
      • test.mosquitto.org
      • iot.eclipse.org
    • Jitsi Meet Server
    • Jitsi Meet用docker裝很簡單
    • 動畫製作
    • 關於作者
  • windows
    • Windows Terminal
    • windows WSL2
      • 安裝桌面
      • 中文化
      • wsl2 docker
    • Windows BAT
    • Windows Git
    • Windows 的命令式套件管理工具:WinGet
    • 取得wifi密碼
    • Node-Red
  • 運算思維
    • Python Install on Windows
      • IPython
      • VS code
        • Untitled
        • Jupyter
      • Simple Use
      • Python Path
      • Start 程式
      • 流程控制:假如
      • 工具:簡易網站
      • 工具:rename
Powered by GitBook
On this page
  • 一個簡易的應用例子 wheather 台南市
  • geo 取得IP資訊
  • 顯示Linux命令速查表 cheat curl
  • 看youtube:ytview -s bashscript

Was this helpful?

  1. 儲存與AIoT
  2. Linux 系統大小事
  3. Shell Script

Bash Script參考:有用BASH腳本的集合

PreviousShell ScriptNextBash Script參考:bench.sh

Last updated 5 years ago

Was this helpful?

git clone

cd Bash-Snippets/

檢視所有命令,進入相關目錄,便可執行命令

ls
CODE_OF_CONDUCT.md  bash-snippets         cloudup         geo         newton       skeleton       todo
CONTRIBUTING.md     bash-snippets.1       crypt           install.sh  pwned        skeleton.bats  transfer
LICENSE             bash-snippets.1.ronn  cryptocurrency  lyrics      qrify        stocks         uninstall.sh
README.md           changelog.md          currency        meme        short        taste          weather
bak2dvd             cheat                 extras          movies      siteciphers  tests          ytview
sudo ./install.sh all

一個簡易的應用例子 wheather 台南市

 weather 台南市
天氣預報: 台南市

               薄雾
  _ - _ - _ -  21 °C          
   _ - _ - _   ↙ 7 km/h       
  _ - _ - _ -  5 km           
               0.0 mm         
                                                       ┌─────────────┐                                                       
┌──────────────────────────────┬───────────────────────┤  一 16 12月 ├───────────────────────┬──────────────────────────────┐
│             早上             │             中午      └──────┬──────┘       晚間            │              晚              │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│    \  /       局部多云       │    \  /       局部多云       │     \   /     晴朗           │     \   /     晴朗           │
│  _ /"".-.     23..25 °C      │  _ /"".-.     26..27 °C      │      .-.      24..26 °C      │      .-.      20 °C          │
│    \_(   ).   ↖ 6-7 km/h     │    \_(   ).   ↘ 10-12 km/h   │   ― (   ) ―   ↗ 13-17 km/h   │   ― (   ) ―   ↓ 7-8 km/h     │
│    /(___(__)  10 km          │    /(___(__)  10 km          │      `-’      10 km          │      `-’      10 km          │
│               0.0 mm | 0%    │               0.0 mm | 0%    │     /   \     0.0 mm | 0%    │     /   \     0.0 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐                                                       
┌──────────────────────────────┬───────────────────────┤  二 17 12月 ├───────────────────────┬──────────────────────────────┐
│             早上             │             中午      └──────┬──────┘       晚間            │              晚              │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│     \   /     晴天           │     \   /     晴天           │     \   /     晴朗           │     \   /     晴朗           │
│      .-.      24..26 °C      │      .-.      27 °C          │      .-.      26..27 °C      │      .-.      25..26 °C      │
│   ― (   ) ―   ↖ 8-10 km/h    │   ― (   ) ―   ↘ 13-15 km/h   │   ― (   ) ―   ↗ 18-26 km/h   │   ― (   ) ―   ↓ 15-22 km/h   │
│      `-’      10 km          │      `-’      10 km          │      `-’      10 km          │      `-’      10 km          │
│     /   \     0.0 mm | 0%    │     /   \     0.0 mm | 0%    │     /   \     0.0 mm | 0%    │     /   \     0.0 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐                                                       
┌──────────────────────────────┬───────────────────────┤  三 18 12月 ├───────────────────────┬──────────────────────────────┐
│             早上             │             中午      └──────┬──────┘       晚間            │              晚              │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│    \  /       局部多云       │     \   /     晴天           │    \  /       局部多云       │    \  /       局部多云       │
│  _ /"".-.     24..26 °C      │      .-.      26..27 °C      │  _ /"".-.     24..26 °C      │  _ /"".-.     23..25 °C      │
│    \_(   ).   ↖ 8-9 km/h     │   ― (   ) ―   ↘ 12-14 km/h   │    \_(   ).   ↗ 21-27 km/h   │    \_(   ).   ↓ 16-21 km/h   │
│    /(___(__)  10 km          │      `-’      10 km          │    /(___(__)  10 km          │    /(___(__)  10 km          │
│               0.0 mm | 0%    │     /   \     0.0 mm | 0%    │               0.0 mm | 0%    │               0.0 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
地点: 臺南市, Taiwan [22.9912348,120.184982]

geo 取得IP資訊

geo -wlrdgm wlp4s0
120.115.4.29 192.168.43.63
172.17.0.1
192.168.43.1
127.0.0.53
Taiwan

Fenjihu

TANET
120.115.4.29
ac:fd:ce:f7:7a:1a

顯示Linux命令速查表 cheat curl

cheat curl
# Download a single file
curl http://path.to.the/file

# Download a file and specify a new filename
curl http://example.com/file.zip -o new_file.zip

# Download multiple files
curl -O URLOfFirstFile -O URLOfSecondFile

# Download all sequentially numbered files (1-24)
curl http://example.com/pic[1-24].jpg

# Download a file and follow redirects
curl -L http://example.com/file

# Download a file and pass HTTP Authentication
curl -u username:password URL 

# Download a file with a Proxy
curl -x proxysever.server.com:PORT http://addressiwantto.access

# Download a file from FTP
curl -u username:password -O ftp://example.com/pub/file.zip

# Get an FTP directory listing
curl ftp://username:password@example.com

# Resume a previously failed download
curl -C - -o partial_file.zip http://example.com/file.zip

# Fetch only the HTTP headers from a response
curl -I http://example.com

# Fetch your external IP and network info as JSON
curl http://ifconfig.me/all/json

# Limit the rate of a download
curl --limit-rate 1000B -O http://path.to.the/file

# POST to a form
curl -F "name=user" -F "password=test" http://example.com

# POST JSON Data
curl -H "Content-Type: application/json" -X POST -d '{"user":"bob","pass":"123"}' http://example.com

# POST data from the standard in / share data on sprunge.us
curl -F 'sprunge=<-' sprunge.us

看youtube:ytview -s bashscript

產生 QRcode : qrify

qrify
Qrify
Description: Converts strings or URLs into a QR code.
Usage: qrify [stringtoturnintoqrcode]
    -u  Update Bash-Snippet Tools
    -m  Enable multiline support (feature not working yet)
    -h  Show the help
    -v  Get the tool version
    -f  Store the QR code as a PNG file
    -d  Decode the QR code from a PNG/GIF/JP(E)G file
Examples:
    qrify this is a test string
    qrify -m two\\nlines
    qrify github.com (no http:// or https://)
    qrify -f fileoutputName google.com
    qrify -d fileName.png

qrify 你好,卓國興
█████████████████████████████████
█████████████████████████████████
████ ▄▄▄▄▄ █   █▄▀ ▀██ ▄▄▄▄▄ ████
████ █   █ █ ▀▄ ███▄ █ █   █ ████
████ █▄▄▄█ █▀██▀▀█ ▀██ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄▀▄█ █▄▀ █▄▄▄▄▄▄▄████
████  █▀  ▄▀█▀▀▄▀▄  ▀██▄█▄▄▄▄████
████▀▄▀▀▀█▄ ██▀ ▄ ▄█▀██▀▀▄▄▄▄████
████▀█ ▀▄▄▄ ▄▀▄█▄ ▀▄██▀ ▄▀▄ █████
███████ ▀▄▄▀▀█ █▀█▀▀▄█▄▀▀▀▄ ▄████
████▄▄██▄█▄▄ ▀█▄▀▄▄  ▄▄▄ ▀▄▄▄████
████ ▄▄▄▄▄ █▀▄  ▄ ▄  █▄█ ▀▄█ ████
████ █   █ █▄▀▄█▄ ▀ ▄▄▄▄▄  ▀ ████
████ █▄▄▄█ █▀▄▀█▀█▀▀▄▀█▀ █▄ █████
████▄▄▄▄▄▄▄█▄▄█▄█▄▄▄▄▄████▄▄▄████
█████████████████████████████████
█████████████████████████████████

網站加密格式資源 :siteciphers google.com

siteciphers google.com

TLS_AES_256_GCM_SHA384 - YES
TLS_CHACHA20_POLY1305_SHA256 - YES
TLS_AES_128_GCM_SHA256 - YES
ECDHE-ECDSA-AES256-GCM-SHA384 - YES
ECDHE-RSA-AES256-GCM-SHA384 - YES
DHE-DSS-AES256-GCM-SHA384 - YES
DHE-RSA-AES256-GCM-SHA384 - YES
ECDHE-ECDSA-CHACHA20-POLY1305 - YES
ECDHE-RSA-CHACHA20-POLY1305 - YES
DHE-RSA-CHACHA20-POLY1305 - YES
ECDHE-ECDSA-AES256-CCM8 - YES
ECDHE-ECDSA-AES256-CCM - YES
DHE-RSA-AES256-CCM8 - YES
DHE-RSA-AES256-CCM - YES
https://github.com/alexanderepstein/Bash-Snippets
Bash-Snippets - Useful BASH Scripts For Heavy Commandline UsersOSTechNix
Logo