FTFF(1)

πŸ’– FTFF(1) β€” the fault tolerant file find utility πŸ’–

General Commands Manual · ftff ✨ bestie edition


🌸 NAME 🌸

ftff β€” the fault tolerant file find utility. yes she finds files. yes she forgives you for typos. she's that girl. πŸ’…


✨ SYNOPSIS ✨

ftff [-#fFhIpq][-t#][start_directory] file_to_find

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. ftff recursively descends the directory hierarchy and reports all the objects in the file system whose name approximately matches the filename you gave it. approximately!! she's not gonna be weird about it!! 🫢

she pulls this off by calculating something called the Weighted Levenshtein Distance. and what is that, you ask? bestie. the Levenshtein Distance is defined as the minimum number of character insertions, deletions and replacements that transform a string A into a string B. that's it. that's the whole thing. it's giving "how many tiny mistakes away are you from the thing you meant" πŸ’€

ftff behaves like

'find start_directory -name file_to_find -print'

with the following differences:

  • ftff is fault tolerant β€” she forgives πŸ₯Ί
  • ftff is NOT case sensitive β€” no cap, case does not matter to her
  • the level of fault tolerance can be adjusted by specifying the optional parameter tolerance. a tolerance of 0 specifies exact match. zero chill, zero mercy, zero forgiveness βœ‹

πŸ’… OPTIONS πŸ’…

  • -h β€” prints a little help/usage information. a lil snack. a lil treat. πŸŽ€
  • -f β€” follow symbolic links on directories. > ⚠️ heads up bestie: a symbolic link like "somewhere -> .." causes naturally an endless loop. like, an actual forever loop. by default ftff does not follow symbolic links to directories, and honestly? she's right for that.
  • -F β€” classify the file type by appending a character to each file name. this character is:
    • '*' for regular files that are executable
    • '/' for directories
    • '@' for symbolic links
    • '|' for FIFOs
    • '=' for sockets
  • -p β€” print the actual distance value in front of the filename. this value is equal to the number of insertions, deletions and replacements necessary to transform the file that was found into the search key (the file_to_find). it's basically the receipts for how far off you were πŸ“‹βœ¨
  • -q β€” keep quiet and do not print any warning about non readable directories. shhh. 🀫
  • -# or -t# β€” set the fault tolerance level to #. the fault tolerance level is an integer in the range 0-255. it specifies the maximum number of errors permitted in finding the approximate match. the default tolerance is
(strlen(searchpattern) - number of wildcards)/6 + 1
  • -I β€” do case sensitive search (default is case in-sensitive). the capital I is doing a LOT of work here, do not confuse it with anything else πŸ’€
  • file_to_find β€” the filename to search for. '*' and '?' can be used as wildcards.
    • '?' denotes one single character.
    • '*' denotes an arbitrary number of characters.
  • start_directory β€” the directory to start the search. the current directory is the default. 🏠
🫢 also important: the last argument to ftff is not parsed for options as the program needs at least one file-name argument. this means that ftff -x will not complain about a wrong option but search for the file named -x. iconic behaviour honestly. she said "that's a filename now." periodt. πŸ‘‘

🌈 EXAMPLE 🌈

ftff samething

this will e.g. find a file called something or sameting or sum-thing or ... πŸ¦‹ the girl is flexible!!

to find all files that start with any prefix, have something like IOComm in between and end on a two letter suffix:

ftff '*iocomm.??'

to find all files that exactly start with the prefix DuPeg:

ftff -0 'dupeg*'

πŸ’€ BUGS πŸ’€

the wildcards '?' and '*' can not be escaped. these characters function always as wildcards. this is however not a big problem since there is normally hardly any file that has these characters in its name. so like. it's fine. it's lowkey fine. πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

Guido Socher (guido@linuxfocus.org) β€” the original main character. we stan. πŸ’œ


🌟 SEE ALSO 🌟

whichman(1), find(1)


✨ that's the whole page bestie ✨ this one lives in the Search utilities section and it's dated August 1998 β€” yeah she's vintage, she's archived, she's still slaying. mwah πŸ’‹πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from