You are not logged in.

#1 2008-07-13 05:33:39

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

[SOLVED]find command not working correctly new version of findutils...

After upgrading my findutils from 4.2.33-1 to 4.4.0-1, it is not working the way it used to. I downgraded to the old one and it is working fine again. However, I am wondering why the newer version can't do what I want it to...

Typically I run the following script to apply mp3gain to my music collection (albums and individual songs):

#!/bin/bash
echo Albums...
find . -mindepth 3 -iname '*.mp3' -execdir mp3gain -k -a {} +
echo Single tracks...
find . -maxdepth 2 -iname '*.mp3' -exec mp3gain -k -r {} +

On the old version, for the albums, the "find" function works as expected by examining the entire album before applying gain. With the new findutils version, the albums are being analysed song-by-song. I suppose since the new version of findutils, there is just a different method to do what I wanted before with -execdir. Does anyone know how to do it on the new version?

Last edited by tony5429 (2008-07-19 06:29:41)

Offline

#2 2008-07-13 10:27:40

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: [SOLVED]find command not working correctly new version of findutils...

This is indeed so, it seems: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489046

For a new approach, it depends what mp3gain can do. Maybe

for album in */*; do
( cd "$album"; mp3gain -k -a *.mp3 )
done

Offline

#3 2008-07-19 06:28:18

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED]find command not working correctly new version of findutils...

Cool. Thanks for the suggestion. I ended up going with...

#!/bin/bash

echo Albums...
for album in */*
do
    cd "$album" > /dev/null 2>&1
    if [ $? = 0 ]
    then
        mp3gain -k -a *.mp3
        cd ..
        cd ..
    fi
done

echo Single tracks...
find . -maxdepth 2 -iname '*.mp3' -exec mp3gain -k -r {} +

exit 0

Offline

Board footer

Powered by FluxBB