Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Get node list for CID
- ipfs routing findprovs <CID>
- # Get local pinned files CID list
- ipfs pin ls
- # Get addresses by peer ID
- ipfs routing findpeer <Peer ID>
- # Add file to local node by it CID
- ipfs pin add <CID>
- # Provide CID
- ipfs routing provide <CID>
- # Download file to current folder by it CID
- ipfs get /ipfs/<CID>
- # Write all pinned CIDs to text file
- ipfs pin ls -q > pinned_cids.txt
- # Download and add to local repo all data by CIDs using text file
- cat pinned_cids.txt | xargs -I {} ipfs pin add {}
- # Remove pinned CID from repository (required gc)
- ipfs pin rm <CID>
- # Garbage clean (remove unpinned blocks from storage)
- ipfs repo gc
- # Storage common info
- ipfs repo stat --human
- # Provideing statistic
- ipfs stats provide
- # PubSub options
- # 1. Run ipfs daemon with --enable-pubsub-experiment option:
- ipfs daemon --enable-pubsub-experiment
- # 2. Topic subscribe:
- ipfs pubsub sub MyTopicName
- # 3. Post message to topic:
- echo "Hello, PubSub!" | ipfs pubsub pub MyTopicName
- # Convert CIDv0 hash to CIDv1:
- ipfs cid base32 <CIDv0>
- # Public gateway address format:
- https://ipfs.io/ipfs/<CID>
- https://<CIDv1>.ipfs.dweb.link
- https://dweb.link/ipfs/<CID>
- # Get list of all IPNS keys
- ipfs key list
- # Rename IPNS key
- ipfs key rename "mykey1" "mykey2"
- # Get CID connected to IPNS key
- ipfs name resolve key_id
- # Generate new IPNS address
- ipfs key gen --type=rsa mykey3
- # Publish content (CID) associated with IPNS address mykey3
- ipfs name publish --key=mykey3 /ipfs/<CID>
- # Publish content (CID) associated with default IPNS address (self)
- ipfs name publish /ipfs/<CID>
Advertisement
Add Comment
Please, Sign In to add comment