mirror of
https://github.com/vbatts/dedupe-linker.git
synced 2024-12-27 17:16:32 +00:00
README: update the usage and remove Travis
This commit is contained in:
parent
ef98140425
commit
4c978a20e4
2 changed files with 29 additions and 24 deletions
21
.travis.yml
21
.travis.yml
|
@ -1,21 +0,0 @@
|
|||
language: go
|
||||
go:
|
||||
- 1.7.1
|
||||
- 1.6.3
|
||||
- 1.5.4
|
||||
|
||||
sudo: false
|
||||
|
||||
before_install:
|
||||
- git config --global url."https://".insteadOf git://
|
||||
- go get -u github.com/golang/lint/golint
|
||||
- mkdir -p $GOPATH/src/github.com/vbatts && ln -sf $(pwd) $GOPATH/src/github.com/vbatts/dedupe-linker
|
||||
- go get ./...
|
||||
|
||||
install: true
|
||||
|
||||
script:
|
||||
- go vet -x ./...
|
||||
- golint -set_exit_status ./...
|
||||
- go test -v ./...
|
||||
- go build -x github.com/vbatts/dedupe-linker
|
32
README.md
32
README.md
|
@ -1,11 +1,37 @@
|
|||
# dedupe-linker
|
||||
|
||||
[![Build Status](https://travis-ci.org/vbatts/dedupe-linker.svg?branch=master)](https://travis-ci.org/vbatts/dedupe-linker)
|
||||
Dedupe regular files on a filesystem by hard linking and a creating a content-addressible look-aside.
|
||||
|
||||
This defaults to `sha1` checksums, but you can specify others like `sha256` or `sha512`.
|
||||
|
||||
This also means that the comparison on whether something is a duplicate is based on checksum, and does not consider mode, owner, or xattrs.
|
||||
|
||||
This is really a pet-project, but changes welcome.
|
||||
And is only focused on Linux compatability, but changes welcome.
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
go get github.com/vbatts/dedupe-linker
|
||||
```shell
|
||||
go install github.com/vbatts/dedupe-linker@latest
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
The default look-aside base directory is in `~/.dedupe-linker`, so the following would dedupe your home directory:
|
||||
|
||||
```shell
|
||||
dedupe-linker -w $(nproc) ~/
|
||||
```
|
||||
|
||||
Cleaning up from the look-aside needs only to check the links as a ref-count:
|
||||
|
||||
```shell
|
||||
find ~/.dedupe-linker/ -type f -links 1
|
||||
```
|
||||
|
||||
Then delete these files that only have 1 reference:
|
||||
|
||||
```shell
|
||||
find ~/.dedupe-linker/ -type f -links 1 -exec rm -f "{}" \;
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue