Home | 简体中文 | 繁体中文 | 杂文 | 知乎专栏 | 51CTO学院 | CSDN程序员研修院 | Github | OSChina 博客 | 腾讯云社区 | 阿里云栖社区 | Facebook | Linkedin | Youtube | 打赏(Donations) | About

第 28 章 IPFS 命令


28.1. help
28.2. ipfs
28.3. 基本命令
28.3.1. 初始化节点
28.3.2. 添加文件或文本到 IPFS 添加文件 添加文本 安静模式,仅返回 Hash 尝试修改内容 递归添加一个目录
28.3.3. 查看文件
28.3.4. 下载文件
28.3.5. 列出文件或目录
28.4. 数据结构命令
28.4.1. 块 写入块 读取块 块状态
28.4.2. 对象
28.5. 高级命令
28.5.1. 守护进程
28.5.2. 发布并解析IPNS
28.5.3. 将 Pin 对象存储到本地 演示 Pin 操作 查看 pin
28.5.4. 查看状态 仓库状态 带宽状态
28.6. 网络命令
28.6.1. 显示 IPFS 信息
28.6.2. 节点
28.6.3. 管理P2P网络链接
28.6.4. 查看节点端口详情
28.7. 配置
28.7.1. 显示配置
28.7.2. 修改配置
28.7.3. API 配置
28.7.4. CORS
28.7.5. 配置 API 网关
28.8. ipfs mount
28.9. 守护进程
28.10. ipfs-update
28.11. DNS 解析

创建 ipfs 用户

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

28.1. help

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

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


  -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/
  --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.

    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
    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)
    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)
    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
    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
  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.