# Useful .stignore Patterns

**URL:** https://forum.syncthing.net/t/useful-stignore-patterns/1175
**Category:** Howto
**Created:** [October 17, 2014, 4:14am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175 "2014-10-17T04:14:30Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Cyphase](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cyphase/32/526_2.png) [@Cyphase](https://forum.syncthing.net/u/Cyphase)
#### Post date: [October 17, 2014, 4:14am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/1 "2014-10-17T04:14:30Z")

</div>

I didn’t see any other post listing useful `.stignore` patterns, so I thought I’d create one. Obviously everyone’s needs are different, but I’m sure there are a few patterns that would be widely useful, so here’s a place to put them instead of everyone discovering them on their own.

Also, on a related note: to sync patterns across all nodes, put the following in each node’s `.stignore` file:

```
// .stignore
//
#include .stglobalignore

```

Then create the `.stglobalignore` file and put the patterns there. An added benefit of doing this, as mentioned by @calmh in the comments, is that having the ignore patterns for a repository be the same on every device is less confusing, given the way things are implemented at the moment. You can read more about that at [the main .stignore post](https://forum.syncthing.net/t/excluding-files-from-synchronization-ignoring/80?u=cyphase); scroll down to **Effects on “In Sync” Status** at the bottom.

Here are the patterns; of course you can pick and choose as you see fit:

```
// .stglobalignore

// Incomplete Downloads
// At least for now, these prevent Syncthing from transferring data that's
// going to be thrown out anyway once the download is finished and the
// file is renamed. Things may change when Syncthing gets smarter.
//
// Firefox downloads and other things
*.part
// Chrom(ium|e) downloads
*.crdownload

// Temporary / Backup Files
*~
.*.swp

// OS-generated files (OS X)
.DS_Store
.Spotlight-V100
.Trashes
._*

// OS-generated files (Windows)
desktop.ini
ehthumbs.db
Thumbs.db

// BTSync files
.sync
*.bts
*.!Sync
.SyncID
.SyncIgnore
.SyncArchive
*.SyncPart
*.SyncTemp
*.SyncOld

// Synology files
@eaDir

```

I’ll update this post based on the comments.

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [October 17, 2014, 1:35pm UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/2 "2014-10-17T13:35:06Z")

</div>

A side note here is that as things are implemented now, it’s going to be less confusing to have the ignore patterns for a given folder be the same on each device. Otherwise things will look out of sync when they aren’t, etc.

---

<div class="post-metadata">

### Author: ![Cyphase](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cyphase/32/526_2.png) [@Cyphase](https://forum.syncthing.net/u/Cyphase)
#### Post date: [October 17, 2014, 5:02pm UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/3 "2014-10-17T17:02:57Z")

</div>

Ah yea, I had read that in [the main .stignore post](https://forum.syncthing.net/t/excluding-files-from-synchronization-ignoring/80). Good to mention 😄.

---

<div class="post-metadata">

### Author: ![May2002](https://forum.syncthing.net/user_avatar/forum.syncthing.net/may2002/32/1200_2.png) [@May2002](https://forum.syncthing.net/u/May2002)
#### Post date: [March 22, 2015, 9:14pm UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/4 "2015-03-22T21:14:16Z")

</div>

Hi,

the idea of the global file is a very good one! … and as a BTSync refugee I can add this to the list, mostly for windows & mac users (from their “OS generated files” list):

```
.DS_Store
.Spotlight-V100
.Trashes
~*
ehthumbs.db
desktop.ini
Thumbs.db
._*

```

@calmh & friends, LOTS of thanks for your work… and to @canton7 too, without whom I would probably not have dared to try Syncthing.

---

<div class="post-metadata">

### Author: ![zukoo](https://forum.syncthing.net/user_avatar/forum.syncthing.net/zukoo/32/891_2.png) [@zukoo](https://forum.syncthing.net/u/zukoo)
#### Post date: [March 24, 2015, 1:17am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/5 "2015-03-24T01:17:07Z")

</div>

Hi, I use `.*.swp` for vim temporary files and `.sync` fot BTSync files.

---

<div class="post-metadata">

### Author: ![Cyphase](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cyphase/32/526_2.png) [@Cyphase](https://forum.syncthing.net/u/Cyphase)
#### Post date: [March 24, 2015, 2:13am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/6 "2015-03-24T02:13:37Z")

</div>

I’m not very familiar with BTSync. Is there a .sync directory in every synced directory, or are you talking about the one config directory for BTSync, i.e. ~/.sync?

---

<div class="post-metadata">

### Author: ![jdrch](https://forum.syncthing.net/user_avatar/forum.syncthing.net/jdrch/32/1061_2.png) [@jdrch](https://forum.syncthing.net/u/jdrch)
#### Post date: [March 24, 2015, 2:29am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/7 "2015-03-24T02:29:19Z")

</div>

> [@Cyphase](#):
>
> Is there a .sync directory in every synced directory

BTSync refugee here. Yes.

---

<div class="post-metadata">

### Author: ![stoofvlees](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/s/ecb155/32.png) [@stoofvlees](https://forum.syncthing.net/u/stoofvlees)
#### Post date: [March 24, 2015, 8:42am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/8 "2015-03-24T08:42:24Z")

</div>

If you use Syncthing on a Synology device it is useful to add these:

```
*@SynoResource
@eaDir
```

---

<div class="post-metadata">

### Author: ![zukoo](https://forum.syncthing.net/user_avatar/forum.syncthing.net/zukoo/32/891_2.png) [@zukoo](https://forum.syncthing.net/u/zukoo)
#### Post date: [March 24, 2015, 9:39am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/9 "2015-03-24T09:39:08Z")

</div>

> [@Cyphase](#):
>
> \*.swp

for vim it is `.*.swp` not `*.swp`

---

<div class="post-metadata">

### Author: ![Cyphase](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cyphase/32/526_2.png) [@Cyphase](https://forum.syncthing.net/u/Cyphase)
#### Post date: [March 24, 2015, 9:04pm UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/10 "2015-03-24T21:04:53Z")

</div>

I’ve never used a Synology device, but from a bit of searching it looks like the `*@SynoResource` files are all in the `@eaDir` directories. Is that correct? If so, just adding `@eaDir` would be enough.

---

<div class="post-metadata">

### Author: ![zukoo](https://forum.syncthing.net/user_avatar/forum.syncthing.net/zukoo/32/891_2.png) [@zukoo](https://forum.syncthing.net/u/zukoo)
#### Post date: [March 26, 2015, 2:29am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/11 "2015-03-26T02:29:27Z")

</div>

You can also add `*.!sync` which are the temporary files of BTSync

---

<div class="post-metadata">

### Author: ![xHN35RQ](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/x/50afbb/32.png) [@xHN35RQ](https://forum.syncthing.net/u/xHN35RQ)
#### Post date: [March 26, 2015, 6:22am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/12 "2015-03-26T06:22:31Z")

</div>

Sometimes my Syncthing’s start to transfer `.stfolder` files so I’ve added those to the ignore lists.

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [March 26, 2015, 9:17am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/13 "2015-03-26T09:17:09Z")

</div>

It doesn’t tranafer that file, its simply mandatory

---

<div class="post-metadata">

### Author: ![wweich](https://forum.syncthing.net/user_avatar/forum.syncthing.net/wweich/32/1063_2.png) [@wweich](https://forum.syncthing.net/u/wweich)
#### Post date: [March 26, 2015, 9:43am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/14 "2015-03-26T09:43:30Z")

</div>

Since version 2.0, btsync uses \*.bts for temporary files.

---

<div class="post-metadata">

### Author: ![xHN35RQ](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/x/50afbb/32.png) [@xHN35RQ](https://forum.syncthing.net/u/xHN35RQ)
#### Post date: [March 26, 2015, 11:49am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/15 "2015-03-26T11:49:35Z")

</div>

oh ok. well sometimes on Windows the .stfolder files become un-hidden so I end up re-hiding them again. I guess that’s what is really happening.

---

<div class="post-metadata">

### Author: ![Cyphase](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cyphase/32/526_2.png) [@Cyphase](https://forum.syncthing.net/u/Cyphase)
#### Post date: [March 26, 2015, 10:20pm UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/16 "2015-03-26T22:20:43Z")

</div>

> [@zukoo](#):
>
> You can also add \*.!sync which are the temporary files of BTSync

(I was going to respond right after you commented, but somehow I forgot 🙂 .)

Is it \*.!sync or \*.!Sync?

> [@wweich](#):
>
> Since version 2.0, btsync uses \*.bts for temporary files.

Same question; is that the correct capitalization?

---

<div class="post-metadata">

### Author: ![xHN35RQ](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/x/50afbb/32.png) [@xHN35RQ](https://forum.syncthing.net/u/xHN35RQ)
#### Post date: [March 27, 2015, 1:47am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/17 "2015-03-27T01:47:27Z")

</div>

BT Sync 1.4 uses a hidden folder `.sync` in each sync folder it’s watching.

BT Sync 2.0 uses `.bts` file extension for temporary placeholder files. See “[What is a bts file?](http://help.getsync.com/customer/portal/articles/1908818-what-is-a-bts-file-)”

To see a list of all dot files BT Sync can generate, view the [Unofficial FAQ](http://forum.bittorrent.com/topic/17782-bittorrent-sync-faq-unofficial/) and scroll down to the section marked _“What are .SyncID, .SyncIgnore, .SyncPart, .SyncTemp .SyncOld and .!Sync files and the .SyncArchive folder?”_

---

<div class="post-metadata">

### Author: ![Cyphase](https://forum.syncthing.net/user_avatar/forum.syncthing.net/cyphase/32/526_2.png) [@Cyphase](https://forum.syncthing.net/u/Cyphase)
#### Post date: [March 27, 2015, 2:20am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/18 "2015-03-27T02:20:56Z")

</div>

I had seen that FAQ, but honestly I was waiting for someone to ask for it before I put all those in. Thanks 😄.

---

<div class="post-metadata">

### Author: ![robsonsobral](https://forum.syncthing.net/user_avatar/forum.syncthing.net/robsonsobral/32/863_2.png) [@robsonsobral](https://forum.syncthing.net/u/robsonsobral)
#### Post date: [March 27, 2015, 3:05am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/19 "2015-03-27T03:05:29Z")

</div>

Hi! Thanks for your initiative of a default ignore file, @Cyphase!

May I suggest you to add LibreOffice temp files?

LibreOffice creates files like `.~lock.filename.ext#` while you’re editing a document and these files are being synced.

* * *

> [@Cyphase](#):
>
> I’ve never used a Synology device, but from a bit of searching it looks like the \*@SynoResource files are all in the @eaDir directories. Is that correct? If so, just adding @eaDir would be enough.

Did you gave it up on `@eaDir` folders?

---

<div class="post-metadata">

### Author: ![robsonsobral](https://forum.syncthing.net/user_avatar/forum.syncthing.net/robsonsobral/32/863_2.png) [@robsonsobral](https://forum.syncthing.net/u/robsonsobral)
#### Post date: [March 27, 2015, 3:06am UTC](https://forum.syncthing.net/t/useful-stignore-patterns/1175/20 "2015-03-27T03:06:14Z")

</div>

@Cyphase, shouldn’t you change “Pulse” back to “Syncthing” on your sample file?

[Next page](https://forum.syncthing.net/t/useful-stignore-patterns/1175.md?page=2)
