Filesearch Version 4
This is the final command-line exclusive build of Filesearch! Now available for all three major OSes, Windows, Linux, and macOS!
Credits:
- GitHub: @nreef12 for building the ARM64 version for macOS
- Friend: @caden_tm for opening the doors to Intel macOS
Compatibility
| OS | 64-bit | 32-bit | ARM64 |
|---|---|---|---|
| Windows | Yes | Yes | Yes |
| macOS | Yes (Intel) | Not Planned | Yes (Silicon) |
| Linux | Yes | Yes | Yes |
You don't know how happy I am to announce that there's a version for every major operating system!
That's right! Windows, macOS and Linux each have their very own version of Filesearch - not to mention it's also built for different CPU architectures, too! So whether you're using Windows 7 on a 32-bit CPU, macOS 26 on a M5 Mac Mini, or Damn Small Linux on a MacBook Pro from 2009, it'll run.
The minimum version of Windows needed to run either the 32-bit or 64-bit is Windows 7 SP1. I am actively working on fixing that and will update the existing files silently. You'll know because this message will be gone - you aren't seeing things... or are you? :) I am—
Features
- Threading
- Logging
- Wildcards
- File searching
- Subdirectory searching
- Switch between two search patterns (BFS / DFS)
- Case-sensitivity
Usage
To demonstrate how simple it is to use this, while typing this, I was also building Rust9x and couldn't find x.py so I typed
| filesearch /fm x.py
and it found it. This command: 1. Matches FILES only, 2. Matches files named EXACTLY "x.py". That's it. That is the bare minimum command to get searching. So with that, I will list 12 examples in four groups of complexity:
- Rush
- filesearch /fm x.py
- filesearch -f favicon.png ./www
- filesearch -d *.app /Applications
- Simple
- filesearch /FM *.pptx C:\Users\Randell\OneDrive\Documents
- filesearch --files income-2023-*.ods
- filesearch --folders wiki /home/server_user/git/www/ --log ~/current-wikis.log
- Specific
- filesearch /FM recording-??-??-2004.avi /mnt/nas-backups/pre2005/camcorder/Vacations/Germany
- filesearch -f rufus-?-??p.exe ..\Downloads
- filesearch -f ??-??-1996_stevie+chris.mp? B:\pre2005\camcorder\mixed-graduations
- Forgetful
- filesearch -d * C:\Users\
- filesearch /FM *-stable.tar.gz .
- filesearch /FM dirent.h C:\.
Installation
Installation is simple. You copy the binary you download to somewhere in your PATH. This could be a custom folder you add to PATH yourself, or a system folder for executables. I prefer the latter myself. Heres how to do it:
Linux
On Linux it's easy. You go to the path you downloaded the zip, extract it and copy filesearch to /usr/bin by running:
sudo cp ./filesearch /usr/bin
or for limited users, you can install it for your user only:
mkdir ~/.local ~/.local/bin
cp ./filesearch ~/.local/bin
echo 'export PATH="$PATH:~/.local/bin"' >> ~/.bashrc
source ~/.bashrcmacOS
Installation is... less easy but still possible. You can not directly write to /bin or /usr/bin even with sudo! So, to install system-wide we need to do some more trickery. First extract the binary to your Downloads folder, then run these commands:
sudo mkdir -p /usr/local/filesearchbin
sudo chmod 755 /usr/local/filesearchbin
echo "/usr/local/filesearchbin" | sudo tee /etc/paths.d/filesearchbin
sudo cp ./filesearch /usr/local/filesearchbinThat should do it. Probably. If not open an issue if I didn't already catch it. Same for any of these installation guides... Aannyway to install it for just your user, no one else, incase you can't use sudo, run:
mkdir ~/filesearchbin
echo 'export PATH="$PATH:~/filesearchbin"' >> ~/.zshrc
source ~/.zshrcWindows
Ah... Windows... You either love it or hate it, but for me it's both. Fight me.
To install Filesearch system-wide for Windows, first make sure you extract the binary to your downloads folder. After that, just:
If prompted, press 'Yes' or enter your password.
3. Navigate to your Downloads folder by using cd followed by your user folder's path. for example, my folder would be C:\\Users\\Emmet\\. Then you just go to the downloads folder, or wherever you extracted the binary to.
4. Run the following commands:
copy .\\filesearch.exe C:\\Windows\\System32\\
filesearchThis will install the binary and verify it runs.
If you instead want it to be just for your user, instead run:
mkdir "%LOCALAPPDATA%\\Programs\\FilesearchBin"
move ".\\filesearch.exe" "%LOCALAPPDATA%\\Programs\\FilesearchBin"
setx PATH "%PATH%;%LOCALAPPDATA%\\Programs\\FilesearchBin"Note: If the method you use includes adding the binary path to your system or user PATH variable, the shell MUST be restarted for it to take effect. This does NOT apply if you copied the binary to System32 on Windows (because it's already in PATH). You can also just run your shell again. For example, if you use
fishas your shell and just added filesearch to your path, just runfishto open a new instance and it will use the new path. This isn't recommended, but it is an alternative for those like me who are lazy sometimes.
FAQ
I realize there are no Frequently Asked Questions, or even any Questions, but a lot of other people do this anyway to give little bits of info when it wouldn't need its own heading.
I get errors about permission denied or <os error #>
That means the user running the search doesn't have permission to access and search inside a folder. Usually these errors are ignored and Filesearch doesn't tell you as to not spam errors, but sometimes it gets seen. It can also happen if you do have permission but it can't be accessed right now.
You said this version has threading, logging, wildcards, better search patterns, etc., but Mine doesn't and only has two options!
You downloaded the SDM mode, the direct conversion of the latest C build. That version is smaller, lightweight, and is only for Sub-directories and Files (not both at once though). You want the revised version.
All in all, this project is fun and a piece of work. A fun piece of work. I'm glad I can make something that two friends aid with for it to be the first result on Bing for 'Filesearch', because yes, I do look my own tool up to actually download it. Anyway, check below for the Downloads, and if you look at the builds of SDM for Windows, you'll notice how I can fit 17 x86 or ARM builds on a 1.44mb floppy disk. You gotta give it to Windows for having the smallest binaries, right? Wait... so, they optimize the sizes to– fit more slop— Wait!! I take that back! WINDOWS SUCKS!!!!!
Why did you read all of this?
