How to search attachments on Confluence file system?
Asked by hoa pham:

Hi, I would like to search for attachments (by file extension) within Confluence. For example, if I want to search all Excel spreadsheets ending with \*.xls, I can perform the /.\*xls.\*/ within the advance search. However, the search will yield over thousands of results. Although there are filters I can use to narrow down the results, I won't be able to see anything about the file sizes.

For many systems, I can use the Linux command line to obtain similar results. However, when running find . -type f -name \\\*.xls within the Confluence parent directory (above the attachments folder), zero results are returned. Does this mean Confluence doesn't upload file attachments to /confluence-data/attachments? If Confluence doesn't upload the files there, how come the attachment folder is by far the largest directory on the server?

du -hs \* \| sort -rh \| head -5

848G sandbox

148G attachments

5.1G index

1.1G webresource-temp

837M plugins-osgi-cache


Answers:
author: Robby Holtmann_IntraFind Software AG_
body: Hi [@hoa pham](/t5/user/viewprofilepage/user-id/655523)

[iFinder Confluence Search](https://marketplace.atlassian.com/apps/1220508/ifinder-confluence-search?hosting=server&tab=overview) is the solution you are looking for. This is a high quality Enterprise Search solution for Confluence and is available at Atlassian Marketplace.

This enterprise search solution delivers top results based on linguistic analysis and offers many additional features. Especially if you have a lot of content in Confluence, searching via the navigation structure becomes very cumbersome. With iFinder Confluence Search all content can be found quickly and easily. In addition, over 600 file formats can be searched and found.

With this technology it is possible to connect also other data sources and applications (websites, Jira, Sharepoint, file shares, and many more).

With one search query in Confluence, all connected sources can be searched.

These articles may help you:

* [iFinder Confluence Search](https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Enterprise-Search-for-Confluence/ba-p/1584172)
* [iFinder Search Macro](https://community.atlassian.com/t5/Marketplace-Apps-Integrations/iFinder-Search-Macro-for-Confluence/ba-p/1717979)

Let me know, if you need further information or like to get a demo first.

Best

Robby


author: Srinatha T
body: [@hoa pham](/t5/user/viewprofilepage/user-id/655523) The files are not stored with the name as it displays on the page. It will be stored as 1 , 2 like that.

In order to identify the location of the attachment you will have to apply some math . It is not straight forward.

Go though the below page to understand how attachments are stored.

[Hierarchical-file-system-attachment-storage](https://confluence.atlassian.com/doc/hierarchical-file-system-attachment-storage-704578486.html#:~:text=To%20find%20the%20directory%20where,for%20that%20space%20are%20stored.)

Thanks,

Srinath T


author: Srinatha T
body: Hi [@hoa pham](/t5/user/viewprofilepage/user-id/655523) ,

Welcome to Atlassian community.

The attachments are stored on the server . Try the steps mentioned on the below URL, it should work. The files are stored in attachment directory under home directory.

* [How-to-search-specific-attachment-type-in-confluence](https://confluence.atlassian.com/confkb/how-to-search-specific-attachment-type-in-confluence-975027237.html)

Thanks,

Srinath T


Tags: confluence-server

server