View previous topic :: View next topic |
Author |
Message |
Gabriel Shear Apprentice


Joined: 17 Apr 2004 Posts: 152 Location: München, Frankfurt am Main, Rostock @ Germany
|
Posted: Wed Sep 07, 2005 2:35 pm Post subject: ls mit Farben |
|
|
Hi,
wieß zufällig jemand was ich machen muss, damit mein ls -l Farben verwendet, also z.B. grün für Verzeichnisse, rot für ausführbare Dateien, fettes weiß für Links etc. so wies halt eigentlich sein sollte?
Vielen Dank.
mfg Gabriel _________________ man believe what he sees and hears |
|
Back to top |
|
 |
toralf Developer


Joined: 01 Feb 2004 Posts: 3943 Location: Hamburg
|
Posted: Wed Sep 07, 2005 2:39 pm Post subject: |
|
|
? |
|
Back to top |
|
 |
SinoTech Advocate

Joined: 20 Mar 2004 Posts: 2579 Location: Neunkirchen / Saarland / Germany
|
Posted: Wed Sep 07, 2005 2:49 pm Post subject: |
|
|
man ls wrote: |
--color[=when]
Specify whether to use color for distinguishing file types. Colors are specified using the LS_COLORS environment variable. For information on how to set this variable, see dircolors(1).
when may be omitted, or one of:
none Do not use color at all. This is the default.
auto Only use color if standard output is a terminal.
always Always use color. Specifying --color and no when is equivalent to --color=always.
|
Und wenn du das als Standartverhalten von ls willst, legst du einfach noch einen alias an. Falls du die bach benutzt:
Code: |
$ echo 'alias ls="ls --color=auto" ' >> ~/.bashrc
|
1. Die "always" Option kann manchmal nerven wenn man die Ausgabe in eine Datei umlenkt und diese dann später editiert.
2. Wer lesen kann ist klar im Vorteil
Mfg
Sino |
|
Back to top |
|
 |
Gabriel Shear Apprentice


Joined: 17 Apr 2004 Posts: 152 Location: München, Frankfurt am Main, Rostock @ Germany
|
Posted: Wed Sep 07, 2005 3:00 pm Post subject: |
|
|
Hi,
ja ok, das hatte ich schon gefunden jedoch bekomme ich dann immer die folgenden Fehlermeldung:
Code: |
user@server ~/ $ ls -l --color=always
ls: illegal option -- -
ls: illegal option -- =
ls: illegal option -- w
ls: illegal option -- y
usage: ls -1RaAdCxmnlogrtucpFbqisfL [files]
|
hat jemand eine Idee weshalb das nicht funktioniert ?
Vielen Dank.
mfg Gabriel _________________ man believe what he sees and hears |
|
Back to top |
|
 |
toralf Developer


Joined: 01 Feb 2004 Posts: 3943 Location: Hamburg
|
Posted: Wed Sep 07, 2005 3:05 pm Post subject: |
|
|
Gabriel Shear wrote: | Hi,
ja ok, das hatte ich schon gefunden jedoch bekomme ich dann immer die folgenden Fehlermeldung:
...
hat jemand eine Idee weshalb das nicht funktioniert ? |
Ich hoffe, Du arbeitest unter Linux ? Und nicht etwa AIX/... ?
BTW in Deiner Signatur: Rostock @ Germnay |
|
Back to top |
|
 |
Gabriel Shear Apprentice


Joined: 17 Apr 2004 Posts: 152 Location: München, Frankfurt am Main, Rostock @ Germany
|
Posted: Wed Sep 07, 2005 3:17 pm Post subject: |
|
|
toralf wrote: |
Ich hoffe, Du arbeitest unter Linux ? Und nicht etwa AIX/... ?
|
ok, dachte das wäre das gleiche weil bisher alle gento scripte etc. funktioniert haben,
Code: |
uname -a
SunOS balitest02 5.8 Generic_117350-12 sun4u sparc SUNW,Sun-Fire-15000
|
wies hierdrauf geht wird hier sicher keiner wissen, oder zufällig doch? habe bisher leider nichts aus --color gefunden.
toralf wrote: |
BTW in Deiner Signatur: Rostock @ Germnay
|
oh ups, danke oh man das stand jetzt seit über einem Jahr so drin, naja egal, passiert halt
Danke.
mfg Gabriel _________________ man believe what he sees and hears |
|
Back to top |
|
 |
|