Retrieving Files

We’re now online, so we can try downloading a file from the network.

ipfs cat /ipfs/QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ/cat.jpg > cat.jpg
$ open cat.jpg

Cute kitten photo

Here’s a kitty from the decentralized web!

If everything is working properly, you should now see an image file open with a picture of a cat! This image file is now on your computer, but you didn’t get it over HTTP, and it may have been downloaded from any of hundreds of IPFS nodes around the world.
ipfs init
initializing ipfs node at /Users/alexandermorris/.go-ipfs
generating 2048-bit RSA keypair...done
peer identity: Qmcpo2iLBikrdf1d6QU6vXuNb6P7hwrbNPW9kLAH8eG67z

NOTE:If you’re following along with the web client (at https://try-ipfs.theblockchaininstitute.org/) then you won’t be able to use the path shown above. Instead, you’ll need the IPFS Address of the file. In this case, we aren’t using any encryption, so the address of our cat.jpg will always be the same hash of the file. You can get the file from the IPFS web example by searching for the ID/hash of the file: QmW2WQi7j6c7UgJTarActp7tDNikE4B2qXtFCfLPdsgaTQ