# What does \`ipfs filestore dups\` mean?

**URL:** <https://discuss.ipfs.tech/t/what-does-ipfs-filestore-dups-mean/4341>\
**Category:** Kubo\
**Created:** [November 26, 2018, 5:28pm UTC](https://discuss.ipfs.tech/t/what-does-ipfs-filestore-dups-mean/4341 "2018-11-26T17:28:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bjzhang](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/bjzhang/32/1123_2.png) [@bjzhang](https://discuss.ipfs.tech/u/bjzhang)\
**Post date:** [November 26, 2018, 5:28pm UTC](https://discuss.ipfs.tech/t/what-does-ipfs-filestore-dups-mean/4341/1 "2018-11-26T17:28:32Z")

</div>

Hi,

From the help and implementation of `ipfs filestore dups`, my understanding is this command could check both filestore and mainblockstore then show the duplicated objects. Because I could not add the same file with and without `—nocopy` flags, I am a little bit confuse about when could I use `ipfs filestore dups`.

I test in commit [Merge pull request #5611 from ipfs/features/streaming-ls-5600 · ipfs/kubo@b7a4853 · GitHub](https://github.com/ipfs/go-ipfs/commit/b7a48531b7b64fcaa858e2c28e42fb4eeb6fcc0d). My steps:

> make install  
> ~/go/bin/ipfs init  
> ~/go/bin/ipfs deamon  
> (start another terminal)  
> ~/go/bin/ipfs add README.md  
> (exit ipfs daemon by pressing Ctrl+c)  
> ~/go/bin/ipfs config --json Experimental.FilestoreEnabled true  
> ~/go/bin/ipfs daemon  
> ~/go/bin/ipfs add --nocopy README.md  
> ~/go/bin/ipfs filestore ls  
> (no output)  
> ~/go/bin/ipfs filestore dups  
> (no output)

Thanks

---

<div class="post-metadata">

**Author:** ![kevina](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@kevina](https://discuss.ipfs.tech/u/kevina)\
**Post date:** [November 27, 2018, 1:31am UTC](https://discuss.ipfs.tech/t/what-does-ipfs-filestore-dups-mean/4341/2 "2018-11-27T01:31:18Z")

</div>

Hi @bjzhang,

There are several things going on

(1) Files added with `--nocopy` imply `--raw-leaves` so you need to specify in order to get the same hash when adding files without the `--nocopy`.

(2) You might need to reverse the order, that is first the file with `--raw-leaves --nocopy` then with just `--raw-leaves`.

(3) Due to what is probably a bug, it seams ipfs will not complain if a file can not be added via the filestore due to path restrictions and instead add it normally.

Kevin

---

<div class="post-metadata">

**Author:** ![bjzhang](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/bjzhang/32/1123_2.png) [@bjzhang](https://discuss.ipfs.tech/u/bjzhang)\
**Post date:** [November 27, 2018, 8:51am UTC](https://discuss.ipfs.tech/t/what-does-ipfs-filestore-dups-mean/4341/3 "2018-11-27T08:51:58Z")

</div>

> (1) Files added with --nocopy imply --raw-leaves so you need to specify in order to get the same hash when adding files without the --nocopy.

Got it.

> (2) You might need to reverse the order, that is first the file with --raw-leaves --nocopy then with just --raw-leaves.

Thanks. It works.

> (3) Due to what is probably a bug, it seams ipfs will not complain if a file can not be added via the filestore due to path restrictions and instead add it normally.

Sorry what’s your mean “path restrictions”?
