So here’s the problem, I listen to all my music streaming from my linux server with MPD and Pitchfork (which is quite an awesome little AJAX interface for MPD). I’ve got a playlist made with Pitchfork that I want to copy to my iPod. These playlists are saved in /mnt/store01/Playlists, while music is stored in /mnt/store01/Music.
How do I copy the files in the playlist to a new directory so I can just copy that whole directory to my iPod?
After a bit of screwing around with trying to feed output from cat into cp with a pipe, and lots of fruitless Googling, I finally found a way with a neat little Linux tool called ‘cpio’:
safari ~ # cd /mnt/store01/Music
safari Music # cpio -Vdp ../musictemp < ../Playlists/1.m3u
............................................................
............................................................
............................................................
............................................................
................
3272929 blocks
And it’s that simple.
0 Responses to “Linux Hacks: Copy a list of files with cpio”