{"id":16215023,"url":"https://github.com/xarg/fnd","last_synced_at":"2025-09-09T22:33:04.242Z","repository":{"id":2764201,"uuid":"3762492","full_name":"xarg/fnd","owner":"xarg","description":"A better find. Not really, but easier to use for simple things.","archived":false,"fork":false,"pushed_at":"2016-10-24T08:54:49.000Z","size":20,"stargazers_count":18,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-11T02:12:55.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xarg.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-19T09:56:40.000Z","updated_at":"2022-02-06T16:27:15.000Z","dependencies_parsed_at":"2022-09-02T12:20:32.140Z","dependency_job_id":null,"html_url":"https://github.com/xarg/fnd","commit_stats":null,"previous_names":["humanfromearth/fnd"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarg%2Ffnd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarg%2Ffnd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarg%2Ffnd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarg%2Ffnd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xarg","download_url":"https://codeload.github.com/xarg/fnd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243982140,"owners_count":20378605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T11:13:41.709Z","updated_at":"2025-03-19T09:31:29.553Z","avatar_url":"https://github.com/xarg.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"fnd\n======\n.. image:: https://secure.travis-ci.org/humanfromearth/fnd.png?branch=master\n\n.. note: This was just an experiment. It's much slower than the unix find command. \n\nA golang implementation of the popular find unix utility.\n\nThe main reason I coded this is because I find myself writing this a lot::\n\n        find -iname \"*x*\"\n\nInstead I want to write::\n\n        fnd x\n\n\nThat's the whole philosophy really.\n\n.. note: This is not a 1:1 implementation of find and I don't plan to make one.\n\nInstall\n---------\n::\n\n        go get -u github.com/xarg/fnd\n\nExample\n---------------------------------\n\nfnd \u003cpattern\u003e \u003cpath\u003e\n\n::\n\n        $ ls .\n        dir1\n        $ fnd # just list the directory\n        ./dir1\n        $ touch dir1/y; touch ./dir1/2; touch ./dir1/x2 #create a few example files\n        $ fnd y\n        ./dir1/y\n        $ fnd 2 # matches *2*\n        ./dir1/2\n        ./dir1/x2\n        $ mkdir -p dir2/y\n        $ fnd y ./dir1 # search just in ./dir1\n        ./dir1/y\n\nRegexp example\n------------------\n\nfnd -e \u003cregexp\u003e \u003cpath\u003e\n\n::\n\n        $ fnd -e x$ # ends with x\n        $ fnd -e ^x # starts with x\n        ./dir1/x2\n        $ fnd -e y$ ./dir2 #search regexp in a directory\n        ./dir2/y\n\n\nDevelopment\n-------------\n\nIf you want to play with it\n\nTesting\n++++++++++\n\n::\n\n        $ go test -v\n        === RUN TestUnixRegexp\n        --- PASS: TestUnixRegexp (0.00 seconds)\n        === RUN TestFindSimple\n        --- PASS: TestFindSimple (0.00 seconds)\n        === RUN TestFindLevels\n        --- PASS: TestFindLevels (0.05 seconds)\n        === RUN TestFindUnixPatternQue\n        --- PASS: TestFindUnixPatternQue (0.00 seconds)\n        === RUN TestFindUnixPatternStar\n        --- PASS: TestFindUnixPatternStar (0.00 seconds)\n        === RUN TestFindRegexp\n        --- PASS: TestFindRegexp (0.00 seconds)\n        === RUN TestFindCaseSensitive\n        --- PASS: TestFindCaseSensitive (0.00 seconds)\n        === RUN TestFindFileType\n        --- PASS: TestFindFileType (0.05 seconds)\n        === RUN TestFindFileTypeSymLink\n        --- PASS: TestFindFileTypeSymLink (0.00 seconds)\n        PASS\n        ok  fnd  0.110s\n\n\nBenchmarking\n------------------------\n\n::\n\n        $ go test -c # this creates fnd.test. This step is required in order to use it with the profiler.\n        $ ./fnd.test -test.bench=\".\" -test.cpuprofile=\"fnd_cpu.prof\" -test.memprofile=\"fnd_mem.prof\"\n        PASS\n        BenchmarkFind\t   50000\t     36418 ns/op\n        $ go tool pprof fnd.test fnd_cpu.prof\n        Welcome to pprof!  For help, type 'help'.\n        (pprof) top10\n        Total: 93 samples\n             32  34.4%  34.4%       42  45.2% runtime.FixAlloc_Free\n             29  31.2%  65.6%       93 100.0% fmt.Fprintln\n              6   6.5%  72.0%       19  20.4% runtime.MHeap_Alloc\n              5   5.4%  77.4%       12  12.9% path/filepath.Clean\n              3   3.2%  80.6%        9   9.7% runtime.MCache_Free\n              3   3.2%  83.9%        6   6.5% runtime.MCentral_FreeList\n              2   2.2%  86.0%        2   2.2% fmt.(*fmt).pad\n              2   2.2%  88.2%       22  23.7% runtime.MGetSizeClassInfo\n              2   2.2%  90.3%        9   9.7% runtime.isNaN\n              1   1.1%  91.4%        1   1.1% flag.(*FlagSet).Parse\n\nPossible features to come:\n---------------------------------\n\n* match terminal highlighting\n* date search\n* optional depth\n* conditionals like: -or -and\n* configuration file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxarg%2Ffnd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxarg%2Ffnd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxarg%2Ffnd/lists"}