My gf likes the Beatles so I placed a couple of tracks on my harddisk ...

Beatles - Here Comes The Sun.mp3
Beatles - If I Fell.mp3
Beatles - Tell me why.mp3
Beatles - Things we said today.mp3

... now from terminal - I can easily enqueue a track to my media player totem

totem --enqueue "Beatles - Here Comes The Sun.mp3"

But sometimes my gf likes to give me smoochies, thus, keeping me busy from spending all day enqueueing tracks one by one.

Is there a way to enque multiple tracks with a single command?

... it doesn't have to be simple ... but she thinks single command lines are so hot, resulting in more smoochies :) Also, please presume that the files could be scattered in subdirectories.

I've tried the following but it didn't work ...

totem --enqueue "$(find -iname "*beatles*")"

It's because of the spacing in the filenames that it doesn't work...


find -iname '*beatles*' -exec totem --enqueue {} +

this executes totem --enqueue with all files found, but escapes the spaces properly.

  • Thank you, that worked just perfectly. This will result in a lot of smoochies! :) – somethis Jan 10 '13 at 16:34
  • Yes, it doesn't work with totem --replace to start a new playlist ... but that would be a new question alltogether. – somethis Jan 10 '13 at 16:36
  • I was wrong, will update answer soon... – Gerhard Burger Jan 10 '13 at 16:43
  • 1
    There! the answer is much better and faster now, it all had to do with escaping the spaces of the files. As a bonus, it also works with --replace now :D – Gerhard Burger Jan 10 '13 at 16:55
  • Oh, yes! Perfect, once again. And as you said, faster, too :) – somethis Jan 10 '13 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.