[ubuntu-uk] How to delete all .m4a files from music library

Mac Ammonius.Grammaticus at googlemail.com
Tue Oct 16 19:02:04 BST 2007

Alec Wright wrote:
> On Tue, 2007-10-16 at 18:48 +0100, Mac wrote:
>> I've got a mixture of .flac and .m4a files of the same music scattered 
>> through the multiple sub directories in ~/music.  I want to delete all 
>> the .m4a files from which ever subdirectory they happen to be in, 
>> leaving the .flac files in their current directories.  (It would be nice 
>> to delete any directories that have become empty because they only had 
>> .m4a files in them - but that would be a bonus!)
>> I'd be grateful for advice about how to do this 'selective recursive 
>> delete' - I can't work out a terminal command with this effect.
>> Sorry if this is dead obvious - I can't see how to do it.
>> TIA
>> Mac
> Try:
> rm -R *.mp4 *.m4a

Alec >>> Thanks for reply.  I tried the form of command you suggest.  It 

rm: cannot lstat `*.mp4': No such file or directory
rm: cannot lstat `*.m4a': No such file or directory


More information about the ubuntu-uk mailing list