Martin Dickopp <[EMAIL PROTECTED]> writes:

> U N T E S T E D :
> -----------------
>
> find olddir -type d | while read d; do mkdir "`echo \"$d\" | sed 
> s,^olddir,newdir,`"; done
> find olddir -type f -name \*.mp3 | while read f; do mv "$f" "`echo \"$f\" | sed 
> s,^olddir,newdir,`"; done

I think my shell-scripting foo disagrees with yours.  I'd do something
like this (also untested):

  cd /old/directory/root
  mkdir /new/directory/root
  ln -s /new/directory/root new
  find . -type d -exec mkdir new/{} \;
  find . -type f -name '*.ogg' -exec cp {} new/{} \;
  rm new

If /new/directory/root is something short (like /mnt), you could just
as easily skip the symlink step.

-- 
David Maze         [EMAIL PROTECTED]      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
        -- Abra Mitchell


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to