SmartFolder is a way to search files on your system and group the results. The program will interpret search queries and create a folder with symbolic links to all the found matches. This is based on the concept of Virtual Folders and is for example used in a feature called Smart Folder in OS X.
This implementation only runs on Linux, and can be tweaked to work in OS X.
You can build the project from the src
directory using make
./SmartFolder <SmartFolderPath> <SearchDirectory> <Search...>
./SmartFolder -d <SmartFolderName>
The search should be written in a RPN format to combine multiple search terms with logical operands.
--name <name>
--size [-+]<size>[K/M/G/T]
--dateStatus [-+]<YYYY-MM-DD>
--dateModified [-+]<YYYY-MM-DD>
--dateUsed [-+]<YYYY-MM-DD>
--uid <loginName>
--gid <groupName>
--perms <octal>
Symbols written in brackets are optional.
- AND / and
- OR / or
- XOR / xor
- NOT / not
Let's say we want all .c and .h files smaller than 1 MB to be searched from the folder ~/Documents/LauzHackWinners
and referenced in the SmartFolder ~/Desktop/memory_leak
, we would invoke our program with the command
./SmartFolder ~/Desktop/memory_leak ~/Documents/LauzHackWinners --name .c --name .h or --size -1M and
Then to delete this SmartFolder, you would use the command
./SmartFolder -d memory_leak
Documentation for the code is available here