Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

Thanks

share|improve this question

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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