Advertisement
sytchenko

IPFS. Client's useful commands

Feb 17th, 2025 (edited)
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. # Get node list for CID
  2. ipfs routing findprovs <CID>
  3.  
  4. # Get local pinned files CID list
  5. ipfs pin ls
  6.  
  7. # Get addresses by peer ID
  8. ipfs routing findpeer <Peer ID>
  9.  
  10. # Add file to local node by it CID
  11. ipfs pin add <CID>
  12.  
  13. # Download file to current folder by it CID
  14. ipfs get /ipfs/<CID>
  15.  
  16. # Write all pinned CIDs to text file
  17. ipfs pin ls -q > pinned_cids.txt
  18.  
  19. # Download and add to local repo all data by CIDs using text file
  20. cat pinned_cids.txt | xargs -I {} ipfs pin add {}
  21.  
  22. # Remove pinned CID from repository (required gs)
  23. ipfs pin rm <CID>
Tags: ipfs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement