Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I've got an mp3 player that stores files in the order that they are written. Unfortunately, when I copy a directory to my mp3 player, it copies the files in a seemingly random order (I say "seemingly" because running the same cp command again copies them in the same strange order). My problem is that, you guessed it, this screws up the play order.
Is there any way around this, barring copying everything one by one (by hand, which gets tedious)?
Here's an example of what I'm talking about:
$ cp -rv /mnt/hd/mp3/Warren\ Zevon/Learning\ To\ Flinch/ .
`/mnt/hd/mp3/Warren Zevon/Learning To Flinch/' -> `./Learning To Flinch'
`/mnt/hd/mp3/Warren Zevon/Learning To Flinch/06-The French Inhaler.mp3' -> `./Learning To Flinch/06-The French Inhaler.mp3'
`/mnt/hd/mp3/Warren Zevon/Learning To Flinch/02-Lawyers, Guns & Money.mp3' -> `./Learning To Flinch/02-Lawyers, Guns & Money.mp3'
`/mnt/hd/mp3/Warren Zevon/Learning To Flinch/12-Jungle Work.mp3' -> `./Learning To Flinch/12-Jungle Work.mp3'
`/mnt/hd/mp3/Warren Zevon/Learning To Flinch/01-Splendid Isolation.mp3' -> `./Learning To Flinch/01-Splendid Isolation.mp3'
`/mnt/hd/mp3/Warren Zevon/Learning To Flinch/03-Mr. Bad Example.mp3' -> `./Learning To Flinch/03-Mr. Bad Example.mp3'
`/mnt/hd/mp3/Warren Zevon/Learning To Flinch/13-Piano Fighter.mp3' -> `./Learning To Flinch/13-Piano Fighter.mp3'
etc etc etc
This was just ripped from a cd in sequential order, so I'm not sure why it's coming out like that. Can anyone help me out here?
The problem isn't the cp command, it's the firmware and FAT filesystem on your mp3 player. It can only display the files in the order written to disk (you can see the same behaviour on older flash drives). If you transcode a folder of music on your PC and look at your encoder's output in the terminal you'll see that the files are not in alphanumeric order and are dealt with one by one in the order that they physically lie on the disk. Fortunately the OS filemanager and command line utilities by default display everything ordered nicely in the way we like.
An easy workaround is to first create a folder on the mp3player like "Warren Zevon - Learning to Flinch" and then copy the music files from the PC into that folder using your file manager. They should now appear on your mp3 player sorted alphanumericaly. This works for me on my cheap cheap chinese mp3 player using emelfm2 file manager.
I know this thread is bit old now, but we had a similar frustration. We copy large amounts of data using the "cp -Rv" command and it's annoying that the copy is not completed alphabetically because if it was we could tell at a glance how far through the copy the job was. We instead use "rsync -av" now and the copy is much easier to monitor.
I'd love to see the gui use this rsync -avP by default [someday] as it's infuriating to find this flaw (in both windows and linux) is the standard behaviour when solutions are (and have been for some time) available.
I saw later that month, that the windows xp computers at (one of) my local library copied all files alphabetically, and remember thinking "what a clever techie, sorting this .. as [any] tech 'would' when copying albums/songs was a feature used often by his/her patrons"