Re: sortieren mit ls (was: wget -i in einzelne Dateien [full version])
On Wed, Feb 14, 2001 at 03:54:01PM +0100, Janto Trappe wrote:
>
> Wenn ich die Dateien aber nach der Version sortieren lasse (-v)
> funktioniert es perfekt. Danke!
>
> Btw: Was soll eigentlich die Version einer Datei sein, wenn es nicht
> das Datum ist?
Steht auf den Info-Seiten zu ls:
| `-v'
| `--sort=version'
| Sort by version name and number, lowest first. It behaves like a
| default sort, excepted that each sequence of decimal digits is
| treated numerically as an index/version number. (*Note More
| details about version sort::.)
und auf der Seite 'More details about version sort':
| The version sort takes into account the fact that file names
| frequently include indices or version numbers. Standard sorting
| functions usually do not produce the ordering that people expect
| because comparisons are made on a character-by-character basis. The
| version sort addresses this problem, and is especially useful when
| browsing directories that contain many files with indices/version
| numbers in their names:
|
| > ls -1 > ls -1v
| foo.zml-1.gz foo.zml-1.gz
| foo.zml-100.gz foo.zml-2.gz
| foo.zml-12.gz foo.zml-6.gz
| foo.zml-13.gz foo.zml-12.gz
| foo.zml-2.gz foo.zml-13.gz
| foo.zml-25.gz foo.zml-25.gz
| foo.zml-6.gz foo.zml-100.gz
|
| Note also that numeric parts with leading zeroes are considered as
| fractional one:
|
| > ls -1 > ls -1v
| abc-1.007.tgz abc-1.007.tgz
| abc-1.012b.tgz abc-1.01a.tgz
| abc-1.01a.tgz abc-1.012b.tgz
--
marko schulz
"Sind Comics Kunst?" "Ist doch scheißegal!"
Stefan Dinters Antwort auf eine Podiumsfrage,
Comicsalon 1997 in Hamburg
--
-----------------------------------------------------------
Um sich aus der Liste auszutragen schicken Sie bitte eine
E-Mail an debian-user-de-request@lehmanns.de die im Subject
"unsubscribe <deine_email_adresse>" enthaelt.
Bei Problemen bitte eine Mail an: Jan.Otto@Lehmanns.de
-----------------------------------------------------------
672 eingetragene Mitglieder in dieser Liste.
Reply to: