I had a need to get a count of files in one of my folders by Year the file was saved.
Using a few lines in Nushell I came up with a way to do this, and with help from the Nushell Discord channel, we came up with a few more.
| # Completions | |
| source ($nu.data-dir | path join 'completions' | path join 'fd-completions.nu') | |
| source ($nu.data-dir | path join 'completions' | path join 'rg-completions.nu') | |
| source ($nu.data-dir | path join 'completions' | path join 'scoop-completions.nu') | |
| source ($nu.data-dir | path join 'completions' | path join 'winget-completions.nu') |
| # PR 20240926 | |
| # This was done for Nushell 98.0 | |
| # PR 20251108_1959 | |
| # use FD to search for a filename | |
| # and join to nuls to get the filename information with path | |
| # PR 20251113 | |
| # Updated to work with Nushell 108.0 |
This is a good site to see example code for Nushell.
Tested under Windows (I used Windows). Should work under Unix like systems (not tested).
# PR 2025-05-20 23:33:44
# Manual with some help from Grok 3 for Unix style ping
# from discord about ping
# https://discord.com/channels/601130461678272522/615253963645911060/threads/1374058672120135813
To seach inside pdf files, use rga
If you want to search inside PDFs (and many other file types like Office documents, archives, e-books, etc.), you can use ripgrep-all (rga), which is a wrapper around ripgrep that adds support for these formats.
rga is available for Windows and can be installed using package managers like Chocolatey or Scoop.