How to collect all hashes of images in a folder uploaded to IPFS

Hi friends!

I am continuing along my IPFS journey and have run into another area that I need guidance.

I would like to get all the hashes for images that I have uploaded as a single folder to IPFS.

Earlier today I spun up my own IPFS node with go-IPFS, and I was able to upload a folder containing 10000 images. As they were uploaded to IPFS in my command terminal I saw that each of them were assigned a specific hash. Now I can’t seem to figure out how to get a list or array of all the image hashes. Are these hashes in my .ipfs folder somewhere or is there a command that I can use to pull these?

I have been trying to look into go-ipfs commands and looking into the existing folders/files of my IPFS node, but so far unsuccessful. Appreciate any guidance or tips.

Use

ipfs ls <CID>

where <CID> is directory IPFS CID

1 Like

To add to what @thegriglat said. You’ll probably want to use MFS. (Mutable File System) which you’ll manipulate with the ‘files’ subcommand. Unless you keep track of that CID of the directory when you added it the stuff you add to IPFS will get lost in a sea of hashes. It’s in there but good luck finding it.