Discussion
Loading...

Post

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

💾 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
Henning
Henning
@hen@berlin.social replied  ·  activity timestamp 5 days 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 replied  ·  activity timestamp last week

@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 replied  ·  activity timestamp last week

@sirodoht You and your low-performance Mac… 🫠

  • Copy link
  • Flag this comment
  • Block
sirodoht
sirodoht
@sirodoht@pan.rent replied  ·  activity timestamp last week

@tommi hahaha exactly right

  • Copy link
  • Flag this comment
  • Block
Tommi 🤯
Tommi 🤯
@tommi@pan.rent replied  ·  activity timestamp 2 weeks ago

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 replied  ·  activity timestamp 2 weeks ago

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

  • Copy link
  • Flag this comment
  • Block
Tommi 🤯
Tommi 🤯
@tommi@pan.rent replied  ·  activity timestamp 2 weeks ago

Thanks @tux0r!

  • Copy link
  • Flag this comment
  • Block
nixFREAK
nixFREAK
@nixfreak@masto.hackers.town replied  ·  activity timestamp 2 weeks ago

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

  • Copy link
  • Flag this comment
  • Block
Tommi 🤯
Tommi 🤯
@tommi@pan.rent replied  ·  activity timestamp 2 weeks ago

@nixfreak I love it

  • Copy link
  • Flag this comment
  • Block
Andy Piper
Andy Piper
@andypiper@macaw.social replied  ·  activity timestamp 2 weeks ago

@tommi @xpub WHAT WILL I GET IF I WIN

  • Copy link
  • Flag this comment
  • Block
Tommi 🤯
Tommi 🤯
@tommi@pan.rent replied  ·  activity timestamp 2 weeks ago

@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.7 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct