Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ls mit Farben
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Gabriel Shear
Apprentice
Apprentice


Joined: 17 Apr 2004
Posts: 152
Location: München, Frankfurt am Main, Rostock @ Germany

PostPosted: Wed Sep 07, 2005 2:35 pm    Post subject: ls mit Farben Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Wed Sep 07, 2005 2:39 pm    Post subject: Reply with quote

Code:
ls -l --color
?
Back to top
View user's profile Send private message
SinoTech
Advocate
Advocate


Joined: 20 Mar 2004
Posts: 2579
Location: Neunkirchen / Saarland / Germany

PostPosted: Wed Sep 07, 2005 2:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gabriel Shear
Apprentice
Apprentice


Joined: 17 Apr 2004
Posts: 152
Location: München, Frankfurt am Main, Rostock @ Germany

PostPosted: Wed Sep 07, 2005 3:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Wed Sep 07, 2005 3:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Gabriel Shear
Apprentice
Apprentice


Joined: 17 Apr 2004
Posts: 152
Location: München, Frankfurt am Main, Rostock @ Germany

PostPosted: Wed Sep 07, 2005 3:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum