Skip to content

file-count

file-count is a powertools program that shows you the number of files in your home directory or any directory that you pass as an argument. This can be useful for comparing against the number of files from the quota command or determining where you may have a large number of files (especially if they are hidden).

Examples

Below are some examples of it's usage. Since file-count is a powertool, the powertools module must be loaded:

1
module load powertools

List file count of home directory

input
1
file-count
output
1
385162  /mnt/home/user/

List file count of all subdirectories in home directory

This includes hidden directories that may contain large numbers of files, like .conda.

input
1
file-count --detail 
output
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
4   /mnt/home/user/.thumbnails
12  /mnt/home/user/.jupyter
22950   /mnt/home/user/R
5   /mnt/home/user/.ssh
446 /mnt/home/user/.config
39  /mnt/home/user/.vnc
...
53  /mnt/home/user/scripts
54356   /mnt/home/user/.cache
6209    /mnt/home/user/.vscode-server
385162  /mnt/home/user/

Note that a summary of all files is given at the bottom

List file count of a research directory

input
1
file-count /mnt/research/my_group
output
1
400124 /mnt/research/my_group/