ipfs

Posted under tech On By xpk

Brought to my attention by a friend, I gave ipfs a try and here is what I did to get started:

$ brew install ipfs
$ ipfs init
$ ipfs version
ipfs version 0.4.14
$ hostname > test.txt
$ ipfs add test.txt
added QmNqNJh8Y7s65ioV6mqqmQUeSoy7UK3BemQExzqF8163HY test.txt
$ curl https://ipfs.io/ipfs/QmNqNJh8Y7s65ioV6mqqmQUeSoy7UK3BemQExzqF8163HY
xpk-pro.comme.ca
$ ipfs get -o test.txt QmNqNJh8Y7s65ioV6mqqmQUeSoy7UK3BemQExzqF8163HY
Saving file(s) to test.txt

The file is stored locally under the blocks directory:

$ cat .ipfs/blocks/FL/CIQAOW2LW2ASR4UBAAWTYWS3OPTZQWIGXRVNJ4IR5HK52CCZ6CE6FLY.data

xpk-pro.comme.ca

Once a file is added to ipfs, it cannot be deleted.

References:

  • https://ipfs.io/docs/commands/

 157 total views,  2 views today