• Stars
    star
    210
  • Rank 187,585 (Top 4 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 12 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A friendlier find(1).

friendly-find

friendly-find is the friendly file finder.

It's meant to be a more usable replacement for find(1). If you've used ack, then ffind is to find as ack is to grep.

Currently it's still in a prototype stage. Most things work, with the following notable exceptions:

  • Time filtering is unimplemented.
  • SVN ignores aren't parsed.
  • It's pretty slow (though pruning VCS data directories saves lots of time).

Feedback is welcome, though remember that it's still a prototype, and is opinionated software.

Installation

If you're on OS X you can use Homebrew:

brew install ffind

Or you can install manually:

  1. Copy the ffind to your computer somehow.
  2. Make it executable.
  3. Get it into your path somehow.

Usage

There's a half-assed man page generated from help2man, but ffind --help is probably easier to read.

Command Line Program

Usage: ffind [options] PATTERN

Options:
  -h, --help            show this help message and exit
  --version             print the version and exit
  -d DIR, --dir=DIR     root the search in DIR (default .)
  -D N, --depth=N       search at most N directories deep (default 25)
  -f, --follow          follow symlinked directories and search their contents
  -F, --no-follow       don't follow symlinked directories (default)
  -0, --print0          separate matches with a null byte in output
  -l, --literal         force literal search, even if it looks like a regex
  -v, --invert          invert match
  -e, --entire          match PATTERN against the entire path string
  -E, --non-entire      match PATTERN against only the filenames (default)
  -p, --full-path       print the file's full path
  -P, --relative-path   print the file's relative path (default)

  Configuring Case Sensitivity:
    -s, --case-sensitive
                        case sensitive matching (default)
    -i, --case-insensitive
                        case insensitive matching
    -S, --case-smart    smart case matching (sensitive if any uppercase chars
                        are in the pattern, insensitive otherwise)

  Configuring Ignoring:
    -b, --binary        allow binary files (default)
    -B, --no-binary     ignore binary files
    -r, --restricted    restricted search (skip VCS directories, parse all
                        ignore files) (default)
    -q, --semi-restricted
                        semi-restricted search (don't parse VCS ignore files,
                        but still skip VCS directories and parse .ffignore)
    -u, --unrestricted  unrestricted search (don't parse ignore files, but
                        still skip VCS directories)
    -a, --all           don't ignore anything (ALL files can match)
    -I PATTERN, --ignore=PATTERN
                        add a pattern to be ignored (can be given multiple
                        times)

  Size Filtering:
    Sizes can be given as a number followed by a prefix.  Some examples:
    1k, 5kb, 1.5gb, 2g, 1024b

    --larger-than=SIZE  match files larger than SIZE (inclusive)
    --smaller-than=SIZE
                        match files smaller than SIZE (inclusive)

  Type Filtering:
    Possible types are a (all), f (files), d (dirs), r (real), s
    (symlinked), e (real files), c (real dirs), x (symlinked files), y
    (symlinked dirs). If multiple types are given they will be unioned
    together:  --type 'es' would match real files and all symlinks.

    -t TYPE(S), --type=TYPE(S)
                        match only specific types of things (files, dirs, non-
                        symlinks, symlinks)

.ffignore file format

The .ffignore file is a file containing lines with patterns to ignore, with a few exceptions:

  • Blank lines and whitespace-only are skipped. If you want to ignore files whose names consist of only whitespace use a regex. Or reconsider what got you there in the first place.
  • Lines beginning with a # are comments and are skipped. There can be whitespace before the # as well.
  • Lines of the form syntax: (literal|regex) change the mode of the lines following them, much like Mercurial's ignore file format. The default is regex mode.
  • All other lines are treated as patterns to ignore.

All patterns are unrooted, and search the full path from the directory you're searching in. Use a regex with ^ if you want to root them.

For example:

foo.*bar

Will ignore:

./foobar.txt
./foohello/world/bar.txt

License

Copyright 2016 Steve Losh and contributors.

Licensed under version 3 of the GPL.

Remember that you can use GPL'ed software through their command line interfaces without any license-related restrictions. ffind's command line interface is the only stable one, so it's the only one you should ever be using anyway. The license doesn't affect you unless you're:

  • Trying to copy the code and release a non-GPL'ed version of ffind.
  • Trying to use it as a Python module from other Python code (for your own sanity I urge you to not do this) and release the result under a non-GPL license.

More Repositories

1

gundo.vim

A git mirror of gundo.vim
Vim Script
1,460
star
2

learnvimscriptthehardway

Shell
1,332
star
3

badwolf

A Vim color scheme.
Vim Script
1,229
star
4

t

A command-line todo list manager for people that want to finish tasks, not organize them. (git mirror)
Python
723
star
5

vitality.vim

Make Vim play nicely with iTerm 2 and tmux.
Vim Script
321
star
6

dotfiles

A git mirror of my dotfiles (.vimrc, .zshrc, .hgrc, etc). Note: this won't work on its own because the real repo uses Mercurial's subrepos. Look at .hgsub and .hgsubstate for what you'll need to get.
Vim Script
300
star
7

splice.vim

A Vim plugin for managing three-way merges.
Python
240
star
8

caves

The code for my Caves of Clojure series of blog posts.
Clojure
157
star
9

clam.vim

A lightweight Vim plugin for working with shell commands.
Vim Script
148
star
10

d

Markdown files to documentation. Nothing else.
CSS
134
star
11

z-fish

A fork of http://github.com/rupa/z to port it to the Fish shell.
Shell
134
star
12

peat

Repeat commands!
Python
128
star
13

stevelosh

A git mirror of my personal site.
JavaScript
125
star
14

cl-chip8

chip-8 emulator in common lisp
Common Lisp
73
star
15

threesome.vim

A git mirror of threesome.vim.
Python
69
star
16

temperance

A logic programming library for Common Lisp.
Common Lisp
53
star
17

tslime2.vim

Send text from Vim to a tmux pane.
Vim Script
50
star
18

clojurecraft

A framework for writing Minecraft bots in Clojure. STILL ALPHA!
Clojure
40
star
19

stoat

A sleek, lightweight, pluggable CMS app for Django.
Python
39
star
20

cl-losh

Common Lisp
33
star
21

red-tape

A Clojure library for working with forms.
Clojure
30
star
22

bookmarkdown

CSS
29
star
23

flask-lesscss

A git mirror of flask-lesscss.
Python
26
star
24

adopt

A Damn OPTion parsing library.
Common Lisp
24
star
25

strftimedammit.vim

A single Vim documentation file that lists strftime-like formatting characters for a variety of languages.
23
star
26

flask-csrf

A git mirror of flask-csrf.
Python
22
star
27

beast

Basic Entity/Aspect/System Toolkit
Common Lisp
21
star
28

cl-digraph

A simple directed graph implementation for Common Lisp.
Common Lisp
21
star
29

cl-nrepl

NREPL server for Common Lisp
Common Lisp
19
star
30

flax

Weaving art from seeds.
Common Lisp
19
star
31

dram

Clojure templating that won't make you drink.
Clojure
17
star
32

cl-blt

Common Lisp bindings for bearlibterminal, with a Lispy interface on top.
Common Lisp
17
star
33

tis100.vim

Git mirror of tis100.vim
Vim Script
15
star
34

rldt

Common Lisp
15
star
35

roul

A tiny Clojure library for working with random numbers.
Clojure
15
star
36

newseasons

A simple Clojure webapp for notifying users when new seasons of their favorite TV shows hit iTunes.
Clojure
15
star
37

coding-math

Common Lisp
12
star
38

pgworld

Procedural world generation in Unity (for GEDE at ReykjavΓ­k University 2016)
C#
10
star
39

bobbin

Bobbin wraps strings.
Common Lisp
9
star
40

typkov

Clojure
9
star
41

django-hoptoad

I don't have time to work on django-hoptoad much any more, but there's a more active fork:
Python
9
star
42

keymando-vim

A Keymando plugin to add a Vim-like editing mode everywhere.
Ruby
7
star
43

euler

Project Euler
Common Lisp
7
star
44

sand

Common Lisp
7
star
45

advent

Git mirror of https://bitbucket.org/sjl/advent
Common Lisp
6
star
46

scully

A General Game Player for imperfect-information games.
Common Lisp
6
star
47

chancery

A text and data generation library for Common Lisp, inspired by Tracery.
Common Lisp
6
star
48

zen

A throwaway roguelike non-game in Clojure.
Clojure
5
star
49

alienscript

Look at the wiki.
JavaScript
5
star
50

mazes

Common Lisp
5
star
51

introduction-to-mathematical-thinking

My notes/work for the Coursera Intro to Mathematical Thinking course.
5
star
52

silt2

Lisp Game Jam August 2016
Common Lisp
4
star
53

silt

Ludum Dare 34
Clojure
4
star
54

cl-netpbm

Common Lisp support for reading/writing PPM, PGM, and PBM files.
Common Lisp
4
star
55

st

Mirror of st with my config and patches applied
C
4
star
56

flask-urls

A git mirror of flask-urls.
Python
4
star
57

cl-ggp

Git mirror of https://bitbucket.org/sjl/cl-ggp/
Common Lisp
4
star
58

brows

urlview in common lisp
Common Lisp
3
star
59

antipodes

https://itch.io/jam/igi-1
Common Lisp
3
star
60

dtach

A tiny program that emulates the detach feature of screen
Shell
3
star
61

boots

A simple text UI framework, inspired by _why's Shoes.
Common Lisp
3
star
62

magitek

Whimsical robots infused with just a hint of magic.
Common Lisp
3
star
63

cl-pcg

Permuted congruential generators in Common Lisp
Common Lisp
2
star
64

eve

My talk at BACON 2012.
Clojure
2
star
65

bones

Git mirror of https://bitbucket.org/sjl/bones/
2
star
66

gdl.vim

Git mirror of https://bitbucket.org/sjl/gdl.vim
Vim Script
2
star
67

merge-conflict-test

A simple repo that provides two branches with a merge conflict.
2
star
68

vex

Yet another vector math library for Common Lisp.
Common Lisp
2
star
69

.plan

Git mirror of https://hg.stevelosh.com/.plan/
2
star
70

ruin

Clojure
2
star
71

els

The Exciting Lisp Solver!
Common Lisp
1
star
72

beef

shavin beefalos in common lisp
Common Lisp
1
star
73

slock

fork of https://tools.suckless.org/slock/ with my patches
C
1
star
74

batty

A 2D Batformer for the October 2017 Lisp Game Jam.
Common Lisp
1
star
75

sm-slurm-example

Demo of snakemake/slurm problem
Python
1
star
76

cacl

Common Lisp
1
star
77

hype

Common Lisp
1
star
78

rosalind

Rosalind problems.
Common Lisp
1
star
79

fern

Common Lisp
1
star
80

conserve

Yet Another CSV Library for Common Lisp.
Common Lisp
1
star
81

cl-gameboy

Common Lisp
1
star
82

dbvolve

Database evolutions for Common Lisp.
Common Lisp
1
star
83

constrained-game

C#
1
star