Comments (2)
If placed inside reflink() it would stat directories multiple times
I implemented the simplest solution for now - I placed restoring in the reflink
.
I believe the performance is not a big problem in this case - stat is way faster than actual deduplicating and stat called on the same file multiple times is cached by the OS.
from fclones.
Given the dedupe
action is almost a userspace-transparent operation I agree that mtimes timestamps should not be affected.
Where is the right place to collect the timestamps beforehand? If placed inside reflink()
it would stat directories multiple times, and returning the result io::Result<..>
is probably annoying. Though maybe a concurrent hashmap could be passed along to skip that step if possible.
Where could it be done earlier? The iterator passed to run_script()
is lazy so the stat'ing has to be woven somewhere into it - and it must reduce the result to unique directories. Not sure if this "dual flow" of files and directories is really possible.
Then the space-efficient fclones::Path
has to be converted to a PathBuf
to do the stat
- should this be kept or should the conversion be repeated later when restoring the timestamps? Also, all other operations don't need that save-restore step at all, so skipping all this should not be expensive.
from fclones.
Related Issues (20)
- fclones remove deleting items in --keep-path HOT 1
- Partially matches HOT 1
- Don't lose the cache if interrupted
- Change to group progress output in 0.33.0 breaks piping to file via stdout HOT 2
- fclones depends on libc6:amd64 (>= 2.36) HOT 4
- On android, running on termux, hard or soft link creation fails after creating the dupes file.
- Hard links are reported as duplicates
- Feedback, showdown against 3 other tools HOT 4
- How to find AND isolate/extract unique files that are in one directory but not another? HOT 2
- Add ability to filter by magic HOT 1
- How to deduplicate and compress?
- Sort file chunks instead of hashing HOT 1
- fclones scans a ton of files that have no chance of matching HOT 4
- fclones `move` ignores standard format log from `group`?
- /var/lib/snapd/void: Permission denied HOT 1
- ARM binary HOT 1
- group output according to order on command line
- "remove" does not work if some files have future modification dates HOT 2
- Why hash whole files? HOT 2
- hard links treated as duplicates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fclones.