EnglishFrenchSpanish

OnWorks favicon

ftwhich - Online in the Cloud

Run ftwhich in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command ftwhich that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


ftwhich - fault tolerant search for a command name

SYNOPSIS


ftwhich [-#hIp][-t#] program_name

DESCRIPTION


ftwhich is a fault tolerant version of the which(1) command. ftwhich searches for a given
program in all directories included in your PATH environment variable and reports all
files with a name that approximately matches the given program_name.

ftwhich achieves fault tolerance by calculating the so called Weighted Levenshtein
Distance. The Levenshtein Distance is defined as the minimum number of character
insertions, deletions and replacements that transform a string A into a string B.

ftwhich is similar to the which command with the following differences:

- ftwhich is by default NOT case sensitive

- ftwhich is fault tolerant

- Some shells have a build in which command that will also search aliases. ftwhich
can naturally not search for aliases as it does not know about alias definitions.

- ftwhich lists all files that approximately match. The files first shown take
preference over files of the same name printed later as they are from directories
listed earlier in the PATH.

- The level of fault tolerance can be adjusted by specifying the optional parameter
tolerance. A tolerance of 0 specifies exact match.

OPTIONS


-h Prints help/usage information.

-I Do case sensitive search (default is case in-sensitive)

-p print the actual distance value in front of the found filename. This value is equal
to the number of insertions, deletions and replacements necessary to transform the
name of the found program into the search key.

-# 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

program_name
The program file to search for. '*' and '?' can be used as wildcards.
'?' denotes one single character.
'*' denotes an arbitrary number of characters.

The last argument to ftwhich is not parsed for options as the program needs at least one
program_name argument. This means that ftwhich -x will not complain about a wrong option
but search for the program named -x.

EXAMPLE


Search for all programs like gcc in your PATH:
ftwhich gcc
This will e.g. find gcc or cc or CC ...

To find all files that start with any prefix and end in config and differ in 2 letters
from the word config:
ftwhich -2 '*config'

To find all files that exactly start with the prefix if:
ftwhich -0 'if*'

To find all clock programs:
ftwhich -0 '*clock*'

Use ftwhich online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Alt-F
    Alt-F
    Alt-F provides a free and open source
    alternative firmware for the DLINK
    DNS-320/320L/321/323/325/327L and
    DNR-322L. Alt-F has Samba and NFS;
    supports ext2/3/4...
    Download Alt-F
  • 2
    usm
    usm
    Usm is a unified slackware package
    manager that handles automatic
    dependency resolution. It unifies
    various package repositories including
    slackware, slacky, p...
    Download usm
  • 3
    Chart.js
    Chart.js
    Chart.js is a Javascript library that
    allows designers and developers to draw
    all kinds of charts using the HTML5
    canvas element. Chart js offers a great
    array ...
    Download Chart.js
  • 4
    iReport-Designer for JasperReports
    iReport-Designer for JasperReports
    NOTE: iReport/Jaspersoft Studio Support
    Announcement: As of version 5.5.0,
    Jaspersoft Studio will be the official
    design client for JasperReports. iReport
    will...
    Download iReport-Designer for JasperReports
  • 5
    PostInstallerF
    PostInstallerF
    PostInstallerF will install all the
    software that Fedora Linux and others
    doesn't include by default, after
    running Fedora for the first time. Its
    easy for...
    Download PostInstallerF
  • 6
    strace
    strace
    The strace project has been moved to
    https://strace.io. strace is a
    diagnostic, debugging and instructional
    userspace tracer for Linux. It is used
    to monitor a...
    Download strace
  • More »

Linux commands

Ad