IPFS命令行中文版

Global p2p merkle-dag filesystem.
命令 参数 英文注释 中文注释 命令描述 官方链接
ipfs(通用可以附加在一些命令前面的)
-c --config string - Path to the configuration file to use. 指定所使用的配置文件
-D --debug bool - Operate in debug mode. Default: false. 是否是调试模式
-L --local bool - Run the command locally, instead of using the daemon. Default: false. 是否使用后台模式运行,默认false
--api string - Use a specific API instance (defaults to /ip4/127.0.0.1/tcp/5001). 指定使用特定的API实例地址,通过这个可以访问WebUi
add 添加文件或者目录到IPFS网络 https://ipfs.io/docs/commands/#ipfs-add
-r --recursive bool - Add directory paths recursively. Default: false. 是否递归添加
-q --quiet bool - Write minimal output. 是否最小输出
-Q --quieter bool - Write only final hash. 是否是只写入hash
-t --trickle bool - Use trickle-dag format for dag generation. 使用 trickle-dag 格式算法生成DAG
-n --only-hash bool - Only chunk and hash - do not write to disk. 仅仅出快和hash,不写入磁盘
-w --wrap-with-directory bool - Wrap files with a directory object. 使用目录对象来包装文件
-H - Include files that are hidden. Only takes effect on recursive add. 是否添加隐藏文件,只有在递归的时候才有用
-s Chunking algorithm to use. 指定分块算法
-pin Pin this object when adding. Default: true. 是否持久化(不被垃圾回收所回收)在添加的时候,默认是true
--raw-leaves Use raw blocks for leaf nodes. (experimental). 实验中的参数。为叶子节点使用原始块
--nocopy Add the file using filestore. (experimental). 使用filestore存储文件
--fscache Check the filestore for pre-existing blocks. (experimental). 检测filestore是否已经存在了数据块
bitswap 同本地bitswap代理交互
ipfs bitswap ledger <peer> Show the current ledger for a peer. 显示当前节点的分类账目信息
ipfs bitswap stat Show some diagnostic information on the bitswap agent. 显示当前bitswap的统计信息
ipfs bitswap wantlist Show blocks currently on the wantlist. 显示当前想要列表的区块
ipfs bitswap unwant <key> Remove a given block from your wantlist. 移除想要列表
block Interact with raw IPFS blocks. 'ipfs block' is a plumbing command used to manipulate raw IPFS blocks. Reads from stdin or writes to stdout, and <key> is a base58 encoded multihash.
ipfs block get Get a raw IPFS block. 获取原始ipfs块信息
ipfs block put <data> Store input as an IPFS block. 把输入作为一个ipfs块
ipfs block stat <key> Print information of a raw IPFS block. 打印ipfs 块统计信息
bootstrap Show or edit the list of bootstrap peers. 这系列命令显示或者编辑ipfs启动节点信息
ipfs bootstrap add <peer> Add peers to the bootstrap list. 把节点加入启动列表,这个命令已经过时,使用 ipfs bootstrap add default 代替
ipfs bootstrap list Show peers in the bootstrap list 显示已有节点列表信息
ipfs bootstrap rm Remove peers from the bootstrap list. 移除启动节点
ipfs bootstrap rm all Remove all peers from the bootstrap list 移除所有启动列表信息
cat Show IPFS object data. 这系列命令显示IPFS对象信息
commands List all available commands. 列出所有可用命令
config Get and set ipfs config values. 这个系列命令。设置和获取IPFS配置值
ipfs config edit Open the config file for editing in $EDITOR. 打开配置文件并进入编辑模式
ipfs config replace Replace the config with <file>. 使用配置文件替换目前的配置文件
ipfs config show Output config file contents. 显示目前已有ipfs配置信息
daemon Run a network-connected IPFS node. 这系列命令。启动一个连接到ipfs公共节点的连接 https://ipfs.io/docs/commands/#ipfs-daemon
ipfs daemon --init Initialize ipfs with default settings if not already initialized. Default: false. 如果节点没有init过,直接init之后启动
ipfs daemon --routing Overrides the routing option. Default: dht. 覆盖默认的路由协议,默认dht
ipfs daemon --mount Mounts IPFS to the filesystem. 挂在IPFS到默认文件系统,默认:false
ipfs daemon --writable Enable writing objects 是否开启可写模式
dag Interact with ipld dag objects. 这个系列命令用来和dag对象交互
ipfs dag get <ref> Get a dag node from ipfs. 从ipfs获取一个dag节点
ipfs dag put <object data> accepts input from a file or stdin and parses it into an object of the specified format 从文件或者标准输入获取数据转换为指定格式对象并且添加一个dag节点到ipfs
ipfs dht 和DHT相关的命令
ipfs dht findpeer 例如:ipfs dht findpeer . Query the DHT for all of the multiaddresses associated with a Peer ID. 查询和节点ID相关联的多地址的所有DHT信息
ipfs dht findprovs Find peers in the DHT that can provide a specific value, given a key. 在DHT网络中找到有指定值的节点
ipfs dht get Given a key, query the DHT for its best value. 在DHT网络中,给定一个key,找到这个key对应的值
ipfs dht provide Announce to the network that you are providing given values. 广播给网络说自己提供了某个值
ipfs dht put Write a key/value pair to the DHT. 往dht网络中写入key-value值
ipfs dht query Find the closest Peer IDs to a given Peer ID by querying the DHT. 查询指定节点附近的节点
diag 这个系列命令是用来诊断的
ipfs diag cmds Lists running and recently run commands. 列出所有最近运行的命令
ipfs diag cmds clear Clear inactive requests from the log 清除最近运行的命令列表
ipfs diag cmds set-time Set how long to keep inactive requests in the log. 设置交互命令请求多长在log中保留
ipfs diag sys Print system diagnostic information 打印诊断社区
ipfs dns To create memorable aliases for multihashes, DNS TXT records can point to other DNS links, IPFS objects, IPNS keys, etc. This command resolves those links to the referenced object. 创建一个方便记忆的别名为ipfs的多个hash地址。DNS text 可以指向其他dns链接,ipfs对象,ipfs 的key值等
ipfs file Interact with IPFS objects representing Unix filesystems. 和ipfs对象交互,返回unix格式系统路径格式
ipfs file ls List directory contents for Unix filesystem objects. 列出ipfs对象,如果是ipfs对象,则列出文件大小,如果是目录,列出目录下的文件
ipfs files Interact with unixfs files. 和系统文件交互。这类的命令都可以加上--flush参数,代表立即写入,默认为true,如果不加,会有数据丢失的风险对于大的数据文件。如果设置为false,可以提高性能。还有如果正在运行 ipfs repo gc 也有可能丢失数据的风险。
ipfs files cp 复制
ipfs files flush 把数据落盘
ipfs files ls 列出路径下的文件
ipfs files mkdir 创建文件夹
ipfs files mv 移动文件夹
ipfs files read
ipfs files rm 删除文件
ipfs files stat 统计文件状态
ipfs files write 写入文件
ipfs filestore 和文件对象交互
ipfs filestore dups List blocks that are both in the filestore and standard block storage. 列出filestore和块存储中的块
ipfs filestore ls List objects in filestore. 列出在filestore中的对象
ipfs filestore verify Verify objects in filestore. 验证在filestore中的对象
ipfs get Download IPFS objects. 下载IPFS对象
ipfs id Show ipfs node id info. 显示IPFS节点信息
ipfs init 初始化ipfs配置文件,默认在本地~/.ipfs 作为ipfs路径,也可以自定义 export IPFS_PATH=/path/to/ipfsrepo
ipfs key Create and list IPNS name keypairs 创建和列出ipns相关的key
ipfs key gen Create a new keypair 创建key
ipfs key list List all local keypairs 列出所有本地key
ipfs log Interact with the daemon log output. 列出ipfs守护进程日志
ipfs log level 改变守护进程的日志级别
ipfs log ls is a utility command used to list the logging subsystems of a running daemon. 列出IPFS运行l 守护进程的log子系统
ipfs log tail 实时输出日志
ipfs ls Displays the contents of an IPFS or IPNS object(s) at the given path, 列出指定目录下的内容
ipfs mount 挂在ipfs到文件系统。默认情况下/ipfs and /ipns,被挂在由于系统文件指定,使用这个选项可以更改和覆盖默认的。
ipfs name
ipfs name publish 每次上传新的文件夹后,得到的Hash均不同,这给访问带来了很大的不便。为了解决这个问题,在持有私钥的情况下可以把fs Hash publish到一个和公钥相关的地址keyHash,这样,用户就可以用keyHash来访问不同的内容,而不用担心内容版本的变化
ipfs name resolve 解析
ipfs object 和对象交互有关的命令
ipfs object data 输出存放在dag节点的IPFS对象字节
ipfs object diff 比较IFPS对象的异同
ipfs object get Get and serialize the DAG node named by <key>. 得到并且序列化使用key标记的dag节点的名称
ipfs object links Output the links pointed to by the specified object. 输出和指定对象关联的ipfs链接
ipfs object new 感觉IPFS对象模板,创建一个ipfs对象。默认返回一个空的默克尔树节点
ipfs object patch Create a new merkledag object based on an existing one. 基于一个已经存在的默克尔树节点,创建一个新的
ipfs object stat Get stats for the DAG node 得到给定key的ipsf对象的统计信息
ipfs pin Pin (and unpin) objects to local storage. Pin 是将文件长期保留在本地,不被垃圾回收。
ipfs pin add
ipfs pin ls 查看那些对象被pin了
ipfs pin rm 从本地移除pin对象
ipfs ping 测试和其他节点连通性
ipfs pubsub An experimental publish-subscribe system on ipfs. 一个实验性的在ipfs网络上的发布订阅命令
ipfs refs 列出ipfs本地或者指定对象所有的链接引用
ipfs repo 用来操作ipfs本地仓库的命令
ipfs repo fsck Remove repo lockfiles. 删除仓库中锁定的文件,只有守护进程停止的时候才有用。
ipfs repo gc will sweep the local set of stored objects and remove ones that are not pinned in order to reclaim hard disk space. 清理更多的本地没有被pin的对象,这样做可以节省更多的存储空间
ipfs repo stat 统计本地仓库信息
ipfs repo verify 验证本地所有ipfs块有没有被损坏
ipfs repo version 查看本地仓库版本
ipfs stats ipfs统计信息
ipfs stats bitswap ipfs bitswap统计信息
ipfs stats bw ipfs带宽统计信息
ipfs stats repo
ipfs swarm The swarm is the component that opens, listens for, and maintains connections to other ipfs peers in the internet. 这个命令是用来操作swarm的。swarm是一个用来监听,维护和其他链接的组件
ipfs swarm addrs lists all addresses this node is aware of. 列出当前节点能感知到的所有地址
ipfs swarm addrs local List local addresses. 显示本地IPFS地址
ipfs swarm connect Open connection to a given address. 连接一个新的IFPS节点
ipfs swarm disconnect 从一个ipfs节点断开
ipfs swarm filters 根据过滤器过滤显示地址
ipfs swarm peers 显示当前节点链接的IPFS节点
ipfs tar 和文件压缩解压缩有关的命令
ipfs tar add parse a tar file and create a merkledag structure to 导入一个tar结构文件到ipfs。过程中要解析一个tar文件并且给他创建一个默克尔树结构
ipfs tar cat 从IPFS中导出一个tar文件
ipfs tour
ipfs update
ipfs version

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 159,015评论 4 362
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,262评论 1 292
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,727评论 0 243
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,986评论 0 205
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,363评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,610评论 1 219
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,871评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,582评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,297评论 1 242
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,551评论 2 246
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,053评论 1 260
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,385评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,035评论 3 236
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,079评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,841评论 0 195
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,648评论 2 274
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,550评论 2 270

推荐阅读更多精彩内容