Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a list of files with paths, some of the files have special characters such as spaces, hyphens, single or double quotes like the following:

/Music/Allman_Brothers/Filmore_east/The Allman Brothers Band - At The Fillmore East (Disc 2) - 02 - In Memory of Elizabeth Reed.mp3

This is actually a playlist. What I need to do is copy the files in this playlist into a single directory. I have tried using xargs without any luck, probably because I haven't used the proper options. :) Can someone help me out with this?


share|improve this question
up vote 2 down vote accepted

On GNU xargs – the one that Linux uses – you can use -d to specify the delimiter:

xargs -d '\n' mv --target somedir/ < playlist.txt 
share|improve this answer
I knew it was something simple. I forgot about the newline. Thanks a lot. :) – Widgeteye The Terrible Aug 6 '13 at 19:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .