making a script

Dave Carrigan dave at rudedog.org
Wed Jul 12 14:37:45 UTC 2006


On Tuesday 11 July 2006 23:17, Chris Lemire wrote:
> How can I make a bash script to seperate my mp3 music from my wma music? My
> wma music cannot be played in Linux. I would like to move all of the
> directories with wma music to another directory. Then when I use Amarok, I
> can tell it not to add the wma music to the collection. The bash script
> should have find or slocate. Using those will find all of the wma music
> files.

Basically you just want to copy all wma files to a different tree then remove 
the wma files in the existing tree:

cd /path/to/music
mkdir /path/to/wma
find . -name '*.wma' -print0 | cpio -pvdml0 /path/to/wma
find . -name '*.wma' -print0 | xargs -0 rm

-- 
Dave Carrigan
Seattle, WA, USA
dave at rudedog.org | http://www.rudedog.org/
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL-Postfix
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060712/3098fc11/attachment.sig>


More information about the ubuntu-users mailing list