Forums
New posts
Search forums
What's new
New posts
Latest activity
Members
Registered members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Audio and Video Talk
Computers & Networking
Bit rot is real...check your tunes
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Help Support AVForums:
This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Message
<blockquote data-quote="Now Playing" data-source="post: 637074" data-attributes="member: 2381"><p>Here's a smarter way to do flac integrity checking in Linux (it lets you resume operations at a future time should you interrupt it or only have it process at certain times:</p><p></p><p>[code]</p><p>#!/bin/bash</p><p></p><p>flac=/usr/bin/flac</p><p>filelist=./flacfiles.list</p><p></p><p># create list of files</p><p></p><p>if [ -f "$filelist" ]</p><p>then</p><p> echo "$filelist already exists, continuing with testing."</p><p>else</p><p> find "." -type f -name "*.flac" > ./flacfiles.list</p><p>fi</p><p></p><p># set the number of seconds to run</p><p># multiply by 3600 for each hour</p><p>(( seconds_to_run= 24 * 3600 ))</p><p></p><p>echo "Run duration: $seconds_to_run seconds"</p><p>echo "Files to process: " $(wc -l $filelist)</p><p></p><p>while [ -s $filelist -a $SECONDS -lt $seconds_to_run ] ; do</p><p> file=$(head -1 $filelist)</p><p> if ! $flac -t --totally-silent "$file" ; then</p><p> echo $file command here >> bad.files</p><p> echo Corrupt: $file</p><p> fi</p><p> # remove current file from list</p><p> sed -i.prev '1d' $filelist</p><p>done</p><p>