Home | 簡體中文 | 繁體中文 | 雜文 | 知乎專欄 | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 視頻教程 | 打賞(Donations) | About
知乎專欄多維度架構 | 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者”

第 34 章 IPFS 命令

目錄

34.1. help
34.2. ipfs
34.3. 基本命令
34.3.1. 初始化節點
34.3.2. 添加檔案或文本到 IPFS
34.3.2.1. 添加檔案
34.3.2.2. 添加文本
34.3.2.3. 安靜模式,僅返回 Hash
34.3.2.4. 嘗試修改內容
34.3.2.5. 遞歸添加一個目錄
34.3.3. 查看檔案
34.3.4. 下載檔案
34.3.5. 列出檔案或目錄
34.4. 資料結構命令
34.4.1. 塊
34.4.1.1. 寫入塊
34.4.1.2. 讀取塊
34.4.1.3. 塊狀態
34.4.2. 對象
34.5. 高級命令
34.5.1. 守護進程
34.5.2. 發佈並解析IPNS
34.5.3. 將 Pin 對象存儲到本地
34.5.3.1. 演示 Pin 操作
34.5.3.2. 查看 pin
34.5.4. 查看狀態
34.5.4.1. 倉庫狀態
34.5.4.2. 頻寬狀態
34.6. 網絡命令
34.6.1. 顯示 IPFS 信息
34.6.2. 節點
34.6.3. 管理P2P網絡連結
34.6.4. 查看節點連接埠詳情
34.7. 配置
34.7.1. 顯示配置
34.7.2. 修改配置
34.7.3. API 配置
34.7.4. CORS
34.7.5. 配置 API 網關
34.8. ipfs mount
34.9. 守護進程
34.10. ipfs-update
34.11. DNS 解析

創建 ipfs 用戶

		
[root@netkiller ~]# adduser ipfs
[root@netkiller ~]# su - ipfs
[ipfs@netkiller ~]$
		
	

34.1. help

		
neo@MacBook-Pro ~ % ipfs --help         
USAGE
  ipfs - Global p2p merkle-dag filesystem.

SYNOPSIS
  ipfs [--config=<config> | -c] [--debug=<debug> | -D] [--help=<help>] [-h=<h>] [--local=<local> | -L] [--api=<api>] <command> ...

OPTIONS

  -c,              --config   string - Path to the configuration file to use.
  -D,              --debug    bool   - Operate in debug mode.
  --help                      bool   - Show the full command help text.
  -h                          bool   - Show a short version of the command help text.
  -L,              --local    bool   - Run the command locally, instead of using the daemon.
  --api                       string - Use a specific API instance (defaults to /ip4/127.0.0.1/tcp/5001).
  --enc,           --encoding string - The encoding type the output should be encoded with (json, xml, or text). Default: text.
  --stream-channels           bool   - Stream channel output.
  --timeout                   string - set a global timeout on the command.

SUBCOMMANDS
  BASIC COMMANDS
    init          Initialize ipfs local configuration
    add <path>    Add a file to IPFS
    cat <ref>     Show IPFS object data
    get <ref>     Download IPFS objects
    ls <ref>      List links from an object
    refs <ref>    List hashes of links from an object
  
  DATA STRUCTURE COMMANDS
    block         Interact with raw blocks in the datastore
    object        Interact with raw dag nodes
    files         Interact with objects as if they were a unix filesystem
    dag           Interact with IPLD documents (experimental)
  
  ADVANCED COMMANDS
    daemon        Start a long-running daemon process
    mount         Mount an IPFS read-only mountpoint
    resolve       Resolve any type of name
    name          Publish and resolve IPNS names
    key           Create and list IPNS name keypairs
    dns           Resolve DNS links
    pin           Pin objects to local storage
    repo          Manipulate the IPFS repository
    stats         Various operational stats
    p2p           Libp2p stream mounting
    filestore     Manage the filestore (experimental)
  
  NETWORK COMMANDS
    id            Show info about IPFS peers
    bootstrap     Add or remove bootstrap peers
    swarm         Manage connections to the p2p network
    dht           Query the DHT for values or peers
    ping          Measure the latency of a connection
    diag          Print diagnostics
  
  TOOL COMMANDS
    config        Manage configuration
    version       Show ipfs version information
    update        Download and apply go-ipfs updates
    commands      List all available commands
  
  Use 'ipfs <command> --help' to learn more about each command.
  
  ipfs uses a repository in the local file system. By default, the repo is
  located at ~/.ipfs. To change the repo location, set the $IPFS_PATH
  environment variable:
  
    export IPFS_PATH=/path/to/ipfsrepo
  
  EXIT STATUS
  
  The CLI will exit with one of the following values:
  
  0     Successful execution.
  1     Failed executions.

  Use 'ipfs <subcmd> --help' for more information about each command.