Andrés Ghigliazza wrote: > It would be useful to me, that cp has an option to copy files > alphabetical.
By default cp used with shell wildcards will already copy files alphabetically due to the shell's sorting of file globs when they are expanded. Example: mkdir test cd test touch aaa zzz bbb echo cp * /tmp/ cp aaa bbb zzz /tmp/ The files presented to cp by the shell's file glob are sorted. Is this not what you are seeing? If not could you debug why not? This is a feature of the shell and is influenced by the 'locale' setting when you started the shell. The locale setting defines the character collation sequence sort order. > The reason is, that there are some portable music players that, play > the songs in the order that were copied to its flash memory. Interesting. Most music players that I have encountered play them in the order of sorted filenames. Therefore a common need is to rename the files into "playlist" order with a leading sort-forcing string. Bob _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils