3 ms·
This has completely changed the way I use files. I rarely ever open the explorer to navigate to a folder, but instead open everything to search for a file and t
by oliwary 5y ago
This has completely changed the way I use files. I rarely ever open the explorer to navigate to a folder, but instead open everything to search for a file and then instantly jump to the file location. Naming files well becomes much more important than where they are located.
- bitexploder 5y agoSpotlight on mac. I use recoll on my Linux machine and let it update every few days. Fast local file system indexing is amazing and abstracts away a lot of file system pain. You often don't even need to name files particularly well to find what you want if you index file contents as well.
- AceyMan 5y agoFor me, > ls -rec . | ? name -match <substring_in_filename> becomes muscle memory as a pwsh daily driver-type-person (=> PowerShell 7).
- DHowett 5y agoFor simple matches against one pattern, you may prefer... > ls -rec . -filter *substring*` ... as filtering can be offloaded to the "provider" when Get-ChildItem (ls) knows about it. Even if the filesystem provider doesn't handle patterns any differently from Where-Object (?), you can save the cost of hydrating FileInfo objects only to query and discard most of them. For multiple patterns or anything that you'd need a regular expression for, Where-Object is superior!
- AceyMan 5y agoThanks, I'm not usually doing performance required stuff but when I write a function I always want to know the best way to feed the pipeline, I appreciate it. #snoverville
- tremon 5y agoaka find . -iname \*<substring_in_filename>* (=> V5 Unix from 1971, although the case insensitive -iname was never standardized)
- Lascaille 5y ago> Naming files well becomes much more important than where they are located. Aren't you just exchanging the location of relevant metadata from the path to the filename?