How to count the number of files in a repository folder

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

To count the number of files of a repository folder, access its folder and create a file with this content:

1 2 3 4 5 6 7 #!/bin/bash # count inodes for each directory LIST=`ls` for i in $LIST; do echo $i find $i -printf "%i\n" | sort -u | wc -l done

This will count how many files are content in each folder in the repository.

Updated on April 7, 2025

Still need help?

The Atlassian Community is here for you.