Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Tommi 🤯
Tommi 🤯
@tommi@pan.rent  ·  activity timestamp last month

💾 The File Count Challenge 🔎

Have you ever wondered how many PDFs, images, videos, or particular kind of files you have on your device? It is the time to find out.

I am hereby proud to officially launch a Fedi-wide file count challenge, in exclusive partnership with the 2025-27 class of @xpub 👾

💁 How to participate

  1. Go to your main device (not mobile)
  2. Open the terminal
  3. Run find . | grep '.pdf$' -c (on Windows: gci -r | where Name -match '\.pdf$')
  4. Repeat the previous command, replacing “pdf” with any file format you are interested in sharing. We suggest: jpg, mp3, and png. 🔆 Bonus: html, js, ttf, odt, svg
  5. Take a screenshot of the output
  6. Share the screenshot on the Fediverse, using the #fileCountChallenge hashtag (please, copy-paste the actual text from the terminal in the image description/alt text)
  7. Add your (user)name and results to the scoreboard
  8. 🆒 Bonus: share the story explaining why you have so many/little files for one format.

🏆 Awards

There is a secret prize for the three people who have the most PDFs, JPEGs, and HTMLs. More info to follow.

Boost, share, fork… Do whatever you want, but please have fun while doing it.

I willl keep writing updates. Yaaaaaaay ⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️

#fileCountChallenge #fileCount #XPUB #challenge #terminal #Linux #cmd #CLI #find #grep #filesystem #file #files

2 media
find | grep '.ttf$' -c
427

find | grep '.odt$' -c
637

find | grep '.svg$' -c
3737

find | grep '.mp3$' -c
150

find | grep '.js$' -c
38819

find | grep '.png$' -c
19199
find | grep '.ttf$' -c 427 find | grep '.odt$' -c 637 find | grep '.svg$' -c 3737 find | grep '.mp3$' -c 150 find | grep '.js$' -c 38819 find | grep '.png$' -c 19199
find | grep '.ttf$' -c 427 find | grep '.odt$' -c 637 find | grep '.svg$' -c 3737 find | grep '.mp3$' -c 150 find | grep '.js$' -c 38819 find | grep '.png$' -c 19199
find | grep '.pdf$' -c
2676

find | grep '.html$' -c
7292

find | grep '.md$' -c
8093

find | grep '.mp4$' -c
1386

find | grep '.jpg$' -c
20561

find | grep '.jxl$' -c
35

find | grep '.ttf$' -c
427
find | grep '.pdf$' -c 2676 find | grep '.html$' -c 7292 find | grep '.md$' -c 8093 find | grep '.mp4$' -c 1386 find | grep '.jpg$' -c 20561 find | grep '.jxl$' -c 35 find | grep '.ttf$' -c 427
find | grep '.pdf$' -c 2676 find | grep '.html$' -c 7292 find | grep '.md$' -c 8093 find | grep '.mp4$' -c 1386 find | grep '.jpg$' -c 20561 find | grep '.jxl$' -c 35 find | grep '.ttf$' -c 427
  • Copy link
  • Flag this post
  • Block
clonejo 2021-W42-3T13:37Z
clonejo 2021-W42-3T13:37Z
@clonejo@social.troll.academy  ·  activity timestamp 3 weeks ago

@tommi @xpub

#fileCountChallenge

This is actually from my NAS, since i can't keep everything around even on my desktop anymore /o\

.JPG is mostly from time lapse photography
.jpg and .gif is mostly from @onlytrains
.c and .h is mostly from Linux, QMK and Cosmopolitan source code
.py is mostly home assistant source code and projects installed/built using pipx/poetry
.json is mostly from home assistant code
.mp3 is actually more podcast episodes than music
.png is mostly factorio <3

$ dust / --file-types --filecount -n 20 -w 60 --screen-reader
Did not have permissions for all directories (add --print-errors to see errors)
(others)       1   403,240  14%
.pyc           1    19,987   1%
.go            1    20,027   1%
.txt           1    21,898   1%
.html          1    24,842   1%
.rs            1    25,331   1%
.gz            1    27,178   1%
.js            1    34,855   1%
.png           1    38,891   1%
.mp3           1    40,237   1%
.nix           1    41,342   1%
.json          1    45,483   2%
.py            1    47,832   2%
.h             1    64,020   2%
.c             1    71,003   3%
.wav           1    99,555   4%
.gif           1   170,433   6%
.JPG           1   270,618  10%
.jpg           1   490,667  18%
(no extension) 1   831,686  30%
(total)        0 2,789,125 100%
$ dust / --file-types --filecount -n 20 -w 60 --screen-reader Did not have permissions for all directories (add --print-errors to see errors) (others) 1 403,240 14% .pyc 1 19,987 1% .go 1 20,027 1% .txt 1 21,898 1% .html 1 24,842 1% .rs 1 25,331 1% .gz 1 27,178 1% .js 1 34,855 1% .png 1 38,891 1% .mp3 1 40,237 1% .nix 1 41,342 1% .json 1 45,483 2% .py 1 47,832 2% .h 1 64,020 2% .c 1 71,003 3% .wav 1 99,555 4% .gif 1 170,433 6% .JPG 1 270,618 10% .jpg 1 490,667 18% (no extension) 1 831,686 30% (total) 0 2,789,125 100%
$ dust / --file-types --filecount -n 20 -w 60 --screen-reader Did not have permissions for all directories (add --print-errors to see errors) (others) 1 403,240 14% .pyc 1 19,987 1% .go 1 20,027 1% .txt 1 21,898 1% .html 1 24,842 1% .rs 1 25,331 1% .gz 1 27,178 1% .js 1 34,855 1% .png 1 38,891 1% .mp3 1 40,237 1% .nix 1 41,342 1% .json 1 45,483 2% .py 1 47,832 2% .h 1 64,020 2% .c 1 71,003 3% .wav 1 99,555 4% .gif 1 170,433 6% .JPG 1 270,618 10% .jpg 1 490,667 18% (no extension) 1 831,686 30% (total) 0 2,789,125 100%
  • Copy link
  • Flag this comment
  • Block
andralves :ciberlandia:​
andralves :ciberlandia:​
@andralves@ciberlandia.pt  ·  activity timestamp 3 weeks ago

@tommi @xpub

I have too many files I didn't know. Probably random git repos I cloned to get a specific tool; Old university projects; Random pdf downloaded over time; many, and many screenshots (and an entire folder of party parrots); The md and html from static sites of @glua (the old one), @ansol and @FestaSoftwareLivre

#fileCountChallenge

find . 2>/dev/null | awk -F. 'BEGIN {printf "\t%9s : %-9s\n\t--------------------\n","File Type","Count"}  /\.(png|pdf|zip|svg|yml|yaml|xml|txt|html|odt|ods|odp|sql|sh|py|java|js|ttf|gz|mp3|mp4|md|webp|jpg)$/ {a[$NF]+=1} END {for (i in a) {printf "\t%9s : %-9s\n",i, a[i]}}'
	File Type : Count    
	--------------------
	      odp : 14       
	     java : 6759     
	       js : 88880    
	       md : 17314    
	     html : 6486     
	      ods : 15       
	      sql : 1498     
	      yml : 1357     
	      svg : 22911    
	      odt : 48       
	       gz : 10058    
	      jpg : 6899     
	     yaml : 1475     
	      ttf : 1353     
	      mp3 : 400      
	      png : 100508   
	      mp4 : 138      
	      zip : 1235     
	      pdf : 2156     
	     webp : 21       
	      txt : 9351     
	       sh : 4691     
	      xml : 33227    
	       py : 49539
find . 2>/dev/null | awk -F. 'BEGIN {printf "\t%9s : %-9s\n\t--------------------\n","File Type","Count"} /\.(png|pdf|zip|svg|yml|yaml|xml|txt|html|odt|ods|odp|sql|sh|py|java|js|ttf|gz|mp3|mp4|md|webp|jpg)$/ {a[$NF]+=1} END {for (i in a) {printf "\t%9s : %-9s\n",i, a[i]}}' File Type : Count -------------------- odp : 14 java : 6759 js : 88880 md : 17314 html : 6486 ods : 15 sql : 1498 yml : 1357 svg : 22911 odt : 48 gz : 10058 jpg : 6899 yaml : 1475 ttf : 1353 mp3 : 400 png : 100508 mp4 : 138 zip : 1235 pdf : 2156 webp : 21 txt : 9351 sh : 4691 xml : 33227 py : 49539
find . 2>/dev/null | awk -F. 'BEGIN {printf "\t%9s : %-9s\n\t--------------------\n","File Type","Count"} /\.(png|pdf|zip|svg|yml|yaml|xml|txt|html|odt|ods|odp|sql|sh|py|java|js|ttf|gz|mp3|mp4|md|webp|jpg)$/ {a[$NF]+=1} END {for (i in a) {printf "\t%9s : %-9s\n",i, a[i]}}' File Type : Count -------------------- odp : 14 java : 6759 js : 88880 md : 17314 html : 6486 ods : 15 sql : 1498 yml : 1357 svg : 22911 odt : 48 gz : 10058 jpg : 6899 yaml : 1475 ttf : 1353 mp3 : 400 png : 100508 mp4 : 138 zip : 1235 pdf : 2156 webp : 21 txt : 9351 sh : 4691 xml : 33227 py : 49539
  • Copy link
  • Flag this comment
  • Block
Sofía Aritz
Sofía Aritz
@sofiaritz@hachyderm.io  ·  activity timestamp 3 weeks ago

@tommi @xpub ...why do I have so 124335 HTML files?? I guess that's what I get for having a few Rust toolchains installed.

#fileCountChallenge

276 PDF files. 4912 JPG files. 263 MP3 files. 31374 PNG files. 124335 HTML files. 4352 JS files. 786 TTF files. 22 ODT files. 193922 SVG files. 8708 RS files. 2129 MD files.

Literal content in the image (many symbols):

sofia@cyberia ~> run0 find | grep '.pdf$' -c
276

sofia@cyberia ~> run0 find | grep '.jpg$' -c
4912

sofia@cyberia ~> run0 find | grep '.mp3$' -c
263

sofia@cyberia ~> run0 find | grep '.png$' -c
31274

sofia@cyberia ~> run0 find | grep '.html$' -c
124335

sofia@cyberia ~> run0 find | grep '.js$' -c
4352

sofia@cyberia ~> run0 find | grep '.ttf$' —c
786

sofia@cyberia ~> run0 find | grep '.odt$' —c
22

sofia@cyberia ~> run0 find | grep '.svg$' -c
193922

sofia@cyberia ~> run0 find | grep '.rs$’ -c
8708

sofia@cyberia ~> run0 find | grep '.md$' -c
2129
276 PDF files. 4912 JPG files. 263 MP3 files. 31374 PNG files. 124335 HTML files. 4352 JS files. 786 TTF files. 22 ODT files. 193922 SVG files. 8708 RS files. 2129 MD files. Literal content in the image (many symbols): sofia@cyberia ~> run0 find | grep '.pdf$' -c 276 sofia@cyberia ~> run0 find | grep '.jpg$' -c 4912 sofia@cyberia ~> run0 find | grep '.mp3$' -c 263 sofia@cyberia ~> run0 find | grep '.png$' -c 31274 sofia@cyberia ~> run0 find | grep '.html$' -c 124335 sofia@cyberia ~> run0 find | grep '.js$' -c 4352 sofia@cyberia ~> run0 find | grep '.ttf$' —c 786 sofia@cyberia ~> run0 find | grep '.odt$' —c 22 sofia@cyberia ~> run0 find | grep '.svg$' -c 193922 sofia@cyberia ~> run0 find | grep '.rs$’ -c 8708 sofia@cyberia ~> run0 find | grep '.md$' -c 2129
276 PDF files. 4912 JPG files. 263 MP3 files. 31374 PNG files. 124335 HTML files. 4352 JS files. 786 TTF files. 22 ODT files. 193922 SVG files. 8708 RS files. 2129 MD files. Literal content in the image (many symbols): sofia@cyberia ~> run0 find | grep '.pdf$' -c 276 sofia@cyberia ~> run0 find | grep '.jpg$' -c 4912 sofia@cyberia ~> run0 find | grep '.mp3$' -c 263 sofia@cyberia ~> run0 find | grep '.png$' -c 31274 sofia@cyberia ~> run0 find | grep '.html$' -c 124335 sofia@cyberia ~> run0 find | grep '.js$' -c 4352 sofia@cyberia ~> run0 find | grep '.ttf$' —c 786 sofia@cyberia ~> run0 find | grep '.odt$' —c 22 sofia@cyberia ~> run0 find | grep '.svg$' -c 193922 sofia@cyberia ~> run0 find | grep '.rs$’ -c 8708 sofia@cyberia ~> run0 find | grep '.md$' -c 2129
  • Copy link
  • Flag this comment
  • Block
Antoine
Antoine
@villapirorum@indieweb.social  ·  activity timestamp 3 weeks ago

@tommi @xpub

Name Count
---- -----
.html 46578
.jpg 110222
.pdf 11196
.cpp 119000

#fileCountChallenge

On personnal laptop (win11)
user(name): antoine

Amount of pdf's because of ebooks
Amount of cpp's because of gamedev
Amount of jpg's because of photo backups
Amount of html's because of webdev


Name   Count
----   -----
.html  46578
.jpg  110222
.pdf   11196
.cpp  119000

PS D:\>
Name Count ---- ----- .html 46578 .jpg 110222 .pdf 11196 .cpp 119000 PS D:\>
Name Count ---- ----- .html 46578 .jpg 110222 .pdf 11196 .cpp 119000 PS D:\>
  • Copy link
  • Flag this comment
  • Block
Henning
Henning
@hen@berlin.social  ·  activity timestamp 4 weeks ago

@tommi

On Mobile AFTER a huge cleanup (will check laptop later)
- 594 PDFs
- 3400 .jpg
- 8933 .jxl
- 603 .png
- 42 .webp
- 121 .gif
- 15 .apk
- 10 .mov
- 91 .mp4
- 2 .mkv

Also I think that command is horribly inefficient, I used this one instead:

find . -type f -name "*.jxl" | wc -l

Way faster even with fd-find (also the syntax is normal) (is there a builtin counting function?)

fd --type f ".jxl" . | wc -l

  • Copy link
  • Flag this comment
  • Block
sirodoht
sirodoht
@sirodoht@pan.rent  ·  activity timestamp 4 weeks ago

@tommi each command takes too long so I stopped at three 😅

Sorry, no caption provided by author
Sorry, no caption provided by author
Sorry, no caption provided by author
  • Copy link
  • Flag this comment
  • Block
Tommi 🤯
Tommi 🤯
@tommi@pan.rent  ·  activity timestamp 4 weeks ago

@sirodoht You and your low-performance Mac… 🫠

  • Copy link
  • Flag this comment
  • Block
sirodoht
sirodoht
@sirodoht@pan.rent  ·  activity timestamp 4 weeks ago

@tommi hahaha exactly right

  • Copy link
  • Flag this comment
  • Block
Tommi 🤯
Tommi 🤯
@tommi@pan.rent  ·  activity timestamp last month

Wow I just discovered that @liw asked something similar already!

https://toot.liw.fi/@liw/113000259103343157

  • Copy link
  • Flag this comment
  • Block
tux0r  :openbsd:
tux0r :openbsd:
@tux0r@layer8.space  ·  activity timestamp last month

@tommi @xpub PowerShell equivalent: gci -r | where Name -match '\.pdf$'

  • Copy link
  • Flag this comment
  • Block
Tommi 🤯
Tommi 🤯
@tommi@pan.rent  ·  activity timestamp last month

Thanks @tux0r!

  • Copy link
  • Flag this comment
  • Block
nixFREAK
nixFREAK
@nixfreak@masto.hackers.town  ·  activity timestamp last month

@tommi @xpub find largest files in directory
du -hs * | sort -rh | head -10

  • Copy link
  • Flag this comment
  • Block
Tommi 🤯
Tommi 🤯
@tommi@pan.rent  ·  activity timestamp last month

@nixfreak I love it

  • Copy link
  • Flag this comment
  • Block
Andy Piper
Andy Piper
@andypiper@macaw.social  ·  activity timestamp last month

@tommi @xpub WHAT WILL I GET IF I WIN

  • Copy link
  • Flag this comment
  • Block
Tommi 🤯
Tommi 🤯
@tommi@pan.rent  ·  activity timestamp last month

@andypiper @xpub SURPRISEEE

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.34 no JS en
Automatic federation enabled
Log in
Instance logo
  • Explore
  • About
  • Members
  • Code of Conduct