Sujet : Re: Too many trolls -- starve 'em!
De : pothead (at) *nospam* snakebite.com (pothead)
Groupes : comp.os.linux.advocacyDate : 19. Oct 2025, 00:56:11
Autres entêtes
Organisation : Muffler Bearings LLC
Message-ID : <10d19er$25mqf$1@pothead.dont-email.me>
References : 1 2 3
User-Agent : slrn/1.0.3 (Linux)
On 2025-10-18, vallor <
vallor@vallor.earth> wrote:
At Sat, 18 Oct 2025 22:52:10 -0000 (UTC), pothead
<pothead@snakebite.com> wrote:
I have a somewhat odd request. I have about 2TB of files that have
been compressed as RAR files. The majority of them have associated
PAR files as well. They are all in different directories under a
single top level directory called "compressed".
>
So how can I run something like "QuickPar" under Linux to traverse
the directories and automatically repair what is broken? And once
that completes, how can I do the same with the RAR files to combine
them back into their original form which is mostly PDF and mp4? Using
a gui will not work due to the number of files, directories and
having to anwer the prompts?
>
Any ideas?
>
Without knowing how your tree is laid out, it's hard to knoNew Boiler Reccomendations w, but any solution
will probably use either parchive (for legacy PAR) or par2 (for PAR 2.0), along
with find and unrar.
>
unrar is shareware, as is rar, so you have to register it after 40 days (or so
says synaptic).
>
The way I'd do it is come up with a script where you can cd into one of your archive directories, run parchive (or par2), then run unrar. After you've satisfied youself that
your script is working, you can use find . -type d to get a list of directories, possibly
using -exec to run your script in each directory. Note that your script will probably
need to accept a directory name as an argument, so it can chdir there to work
your par/unrar magic.
>
(Of course, this assumes you have just one archive per directory. If you have more
than one, your find command will have to be that much smarter...)
>
perl being my go-to language, I'd probably end up writing it in perl. I don't expect
others to know perl, though, because it's gone out of style...alas. But if you're feeling
adventurous, you can ask an LLM to write the script for you. (This newsreader is
written in tk/perl, and large chunks of it are output from ChatGPT5.)
>
Or if you want to be more modern about it, you might want to try python -- but first,
try a shell script. It may be easier than you think.
>
Thank you for your wonderful suggestions.
I'm working on it as we speak.
TIA.
-- pothead"I have a lot of friends who are Democrats, and they’re idiots.I always say they have big hearts and little brains.Almost every single policy rolled out failed.”-- Jamie Dimon CEO JPMorgan Chase.