bobafetthotmail / par2drive Goto Github PK
View Code? Open in Web Editor NEWa wrapper script to use par2cmdline for protecting data in your hard drive
License: GNU General Public License v3.0
a wrapper script to use par2cmdline for protecting data in your hard drive
License: GNU General Public License v3.0
# create test directory:
username@computer:~> mkdir ~/par2test/
# create empty file:
username@computer:~> touch ~/par2test/a
# create non-empty file:
username@computer:~> </dev/urandom head -c 10m >~/par2test/b
# run par2test in test directory
username@computer:~> cd ~/par2test/
username@computer:~/par2test> par2drive sync .
working on ./a
was modified, generating again the parity files
Skipping 0 byte file: /home/username/par2test/a
You must specify a list of files when creating.
Warning! error detected, terminating batch processing.
username@computer:~/par2test> ls .
a b
As the above shows, any 0 byte files will prevent par2drive
from working on any other file.
I think I fixed it for myself by changing line 147 from
Line 147 in 9e91b03
to
if [[ -s "$file" && "$date_last_modified_parity" -lt "$date_last_modified_file" ]] ; then
but that uses the [[ ... ]]
bashism, which I understand is not acceptable for what your script targets.
I'm sure a portable solution is simple, but I'm not aware of the best method. I didn't want to add an entirely new if statement just for that, so I gave up on trying.
For folders with many files, all the generated parity files tend to clutter up the source folder. It would be great if we could pass an optional folder path for saving all the parity files to. It would have an identical folder structure that mirrors the source path, but would only contain parity files.
Or do you have any other suggestions for preventing source folders from being crowded with parity files?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.