36 lines
1 KiB
Markdown
36 lines
1 KiB
Markdown
fif
|
|
===
|
|
[![Crates.io](https://img.shields.io/crates/v/fif.svg?style=flat-square)](https://crates.io/crates/fif)
|
|
[![Crates.io](https://img.shields.io/crates/l/fif.svg?style=flat-square)](https://git.bune.city/lynnesbian/fif/src/branch/master/LICENSE)
|
|
|
|
A command-line tool for detecting and optionally correcting files with incorrect extensions.
|
|
|
|
## Installation
|
|
```bash
|
|
cargo install --locked fif
|
|
```
|
|
|
|
## Usage
|
|
See `fif --help` for more.
|
|
|
|
### The basics
|
|
The simplest way to use fif looks like this:
|
|
```bash
|
|
fif -E images ~/Pictures
|
|
```
|
|
|
|
This command will scan all of the files with extensions used by image files (.jpg, .png, etc) in your `~/Pictures`
|
|
directory.
|
|
|
|
You can also manually specify a set of extensions to use:
|
|
|
|
```bash
|
|
fif -e jpeg,jpg,zip,docx ~/Documents
|
|
```
|
|
|
|
By default, fif will output a bash script that can be used to fix all the files it found with incorrect file extensions.
|
|
You might find it useful to output this script to a file (rather than to stdout):
|
|
|
|
```bash
|
|
fif -E images ~/Pictures > output.sh
|
|
```
|