# The better ipfs output path

**URL:** <https://discuss.ipfs.tech/t/the-better-ipfs-output-path/851>\
**Category:** Help\
**Tags:** go-ipfs\
**Created:** [July 29, 2017, 9:25am UTC](https://discuss.ipfs.tech/t/the-better-ipfs-output-path/851 "2017-07-29T09:25:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alvin](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/alvin/32/413_2.png) [@Alvin](https://discuss.ipfs.tech/u/Alvin)\
**Post date:** [July 29, 2017, 9:25am UTC](https://discuss.ipfs.tech/t/the-better-ipfs-output-path/851/1 "2017-07-29T09:25:06Z")

</div>

When i use the command ‘ipfs get XXXXXXXX’, i find the downloaded content in the go-ipfs binary directory, and when i use ‘ipfs pin ls’，i can’t see that.  
So, i think maybe set the default output path to RepoPath will be better.  
😂

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [July 29, 2017, 12:41pm UTC](https://discuss.ipfs.tech/t/the-better-ipfs-output-path/851/2 "2017-07-29T12:41:26Z")

</div>

For me `ipfs get` downloads to the location from which ipfs is being run (pwd). So not sure what you mean…

---

<div class="post-metadata">

**Author:** ![JayBrown](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jaybrown/32/107_2.png) [@JayBrown](https://discuss.ipfs.tech/u/JayBrown)\
**Post date:** [July 29, 2017, 4:10pm UTC](https://discuss.ipfs.tech/t/the-better-ipfs-output-path/851/3 "2017-07-29T16:10:50Z")

</div>

Same here: new terminal defaults to $HOME, and that’s where `ipfs get` puts the downloaded file.

As for the pin command, and correct me if I’m wrong: if you just `ipfs get` an object, it’s not pinned, maybe not even cached. You need to run `ipfs pin add <hash>`. Don’t know how it is with `ipfs cat <hash> > filename`. This will also download the object to your working directory, but will the object also get pinned? Cached sure, but pinned I believe not.

---

<div class="post-metadata">

**Author:** ![flyingzumwalt](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/flyingzumwalt/32/12_2.png) [@flyingzumwalt](https://discuss.ipfs.tech/u/flyingzumwalt)\
**Post date:** [July 29, 2017, 6:07pm UTC](https://discuss.ipfs.tech/t/the-better-ipfs-output-path/851/4 "2017-07-29T18:07:44Z")

</div>

@Alvin it seems like you might be confused about the purpose of `ipfs get`. The documentation might be unclear.

The `ipfs get` command is basically a “read this thing out of the ipfs system and put it on my regular filesystem”. It’s asking your ipfs node to get content from the ipfs network – maybe from your local ipfs repo, maybe from another node – and write it to your regular filesystem. It’s a more user-friendly version of `ipfs cat`. With `ipfs cat` you would have to write the contents of the output into a file. `ipfs get` handles that for you.

As with `ipfs cat`, running `ipfs get` does not pin the content into your repo. It just retrieves the content and passes it to the destination on your filesystem (by default, the directory where you ran the command). If you want that content pinned on your node, you have to use the `ipfs pin add` command.

---

<div class="post-metadata">

**Author:** ![JayBrown](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jaybrown/32/107_2.png) [@JayBrown](https://discuss.ipfs.tech/u/JayBrown)\
**Post date:** [July 29, 2017, 7:08pm UTC](https://discuss.ipfs.tech/t/the-better-ipfs-output-path/851/5 "2017-07-29T19:08:49Z")

</div>

Question for the pro @flyingzumwalt: so if get is the user-friendly version of cat, does that mean that both commands (get & cat) will temporarily cache the file?

---

<div class="post-metadata">

**Author:** ![flyingzumwalt](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/flyingzumwalt/32/12_2.png) [@flyingzumwalt](https://discuss.ipfs.tech/u/flyingzumwalt)\
**Post date:** [July 29, 2017, 7:23pm UTC](https://discuss.ipfs.tech/t/the-better-ipfs-output-path/851/6 "2017-07-29T19:23:57Z")

</div>

`cat` definitely caches the file (or data) temporarily. I’m pretty sure that `get` does too. @Kubuxu can you confirm that?

---

<div class="post-metadata">

**Author:** ![Kubuxu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/kubuxu/32/17_2.png) [@Kubuxu](https://discuss.ipfs.tech/u/Kubuxu)\
**Post date:** [July 29, 2017, 8:23pm UTC](https://discuss.ipfs.tech/t/the-better-ipfs-output-path/851/7 "2017-07-29T20:23:47Z")

</div>

Yes, both those functions save date they download and save data to the blockstore. It will be there (if not pinned) until next GC.
