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

Alec Wright alecjw at gmail.com
Tue Oct 16 18:54:08 BST 2007


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 Wright <alecjw at gmail.com>




More information about the ubuntu-uk mailing list