Debian dir so wie bei Suse machen
-
- Posts: 34
- Joined: 2006-10-30 00:09
Debian dir so wie bei Suse machen
Ich hatte gerade das Vergnüngen an einem Suse Server etwas zu ändern. Dabei ist mir aufgefallen, dass die "dir" funktion dort viel schöner ist. Man sieht, ob es eine Datei oder ein Verzeichnis ist (farbig dargestellt) und wann die datei geändert wurde, sowie die Rechte.
Wenn ich "dir" auf meinem Debian Server aufrufe stehen die Dateien/Ordner da alle in einer Reihe hinter einander und man sieht nicht, ob es ein Ordner oder Datei ist. Gibt es eine Möglichkeit das dort genauso zu machen?
Wenn ich "dir" auf meinem Debian Server aufrufe stehen die Dateien/Ordner da alle in einer Reihe hinter einander und man sieht nicht, ob es ein Ordner oder Datei ist. Gibt es eine Möglichkeit das dort genauso zu machen?
-
- Posts: 133
- Joined: 2004-03-30 14:44
Re: Debian dir so wie bei Suse machen
Code: Select all
ls --color=auto
-
- Posts: 34
- Joined: 2006-10-30 00:09
Re: Debian dir so wie bei Suse machen
Thx, aber kann man das auch automatisieren, sodass ich das nicht immer eingeben?juergen wrote:Code: Select all
ls --color=auto
-
- Posts: 133
- Joined: 2004-03-30 14:44
Re: Debian dir so wie bei Suse machen
alias ls='ls --color=auto'
-
- Posts: 207
- Joined: 2005-06-02 11:58
Re: Debian dir so wie bei Suse machen
Und den Alias in /etc/profile eintragen ;).
-
- Posts: 34
- Joined: 2006-10-30 00:09
Re: Debian dir so wie bei Suse machen
Was soll das bringen?djcrackman wrote:Und den Alias in /etc/profile eintragen ;).
-
- Administrator
- Posts: 2643
- Joined: 2004-01-21 17:44
Re: Debian dir so wie bei Suse machen
MF-Scripts wrote:Was soll das bringen?
Code: Select all
man alias
-
- Posts: 34
- Joined: 2006-10-30 00:09
Re: Debian dir so wie bei Suse machen
No Manual Entry for alias
Ist das normal das in /etc/profiles nichts drin steht?
Wie muss ich das da rein schreiben?
alias ls='ls --color=auto'
wenn ich das eintrage, klappt das nicht
EDIT: Nach dem Eintragen in ~/.bashrc hat es geklappt :)
Ist das normal das in /etc/profiles nichts drin steht?
Wie muss ich das da rein schreiben?
alias ls='ls --color=auto'
wenn ich das eintrage, klappt das nicht
EDIT: Nach dem Eintragen in ~/.bashrc hat es geklappt :)
-
- Administrator
- Posts: 2643
- Joined: 2004-01-21 17:44
Re: Debian dir so wie bei Suse machen
Sollte aber eigentlich. Hast Du danach einMF-Scripts wrote:alias ls='ls --color=auto'
wenn ich das eintrage, klappt das nicht
Code: Select all
source /etc/profile
-
- Posts: 34
- Joined: 2006-10-30 00:09
Re: Debian dir so wie bei Suse machen
Nö, aber hast du mein Edit nciht gelesen? ;)jfreund wrote:Sollte aber eigentlich. Hast Du danach einMF-Scripts wrote:alias ls='ls --color=auto'
wenn ich das eintrage, klappt das nichtausgeführt?Code: Select all
source /etc/profile
-
- Posts: 427
- Joined: 2006-10-03 01:31
Re: Debian dir so wie bei Suse machen
Ach, bitte(von Vanilla Debian Sarge):
/etc/skel/.bashrc:
bzw /root/.bashrc
Wenn Du andere Farben haben willst mußt Du eben Deine Farbdefinition als Parameter mit geben
dann ändere Das obige einfach:
/etc/skel/.bashrc:
Code: Select all
# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
fi
bzw /root/.bashrc
Code: Select all
# export LS_OPTIONS='--color=auto'
# eval "`dircolors`"
# alias ls='ls $LS_OPTIONS'
# alias ll='ls $LS_OPTIONS -l'
# alias l='ls $LS_OPTIONS -lA'
Code: Select all
dircolors -p > meineSchoenenFarben
Code: Select all
eval "`dircolors meineSchoenenFarben`"
-
- Project Manager
- Posts: 11190
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: Debian dir so wie bei Suse machen
Wo wir schon dabei sind:
Code: Select all
gentoo ~ # cat /etc/bash/bashrc
# /etc/bash/bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control. #65623
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize
# Enable history appending instead of overwriting. #139609
shopt -s histappend
# Set colorful PS1 only on colorful terminals.
# dircolors --print-database uses its own built-in database
# instead of using /etc/DIR_COLORS. Try to use the external file
# first to take advantage of user additions. Use internal bash
# globbing instead of external grep binary.
use_color=false
safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
if [[ -f /etc/DIR_COLORS ]] ; then
match_lhs=$(</etc/DIR_COLORS)
elif type -p dircolors >/dev/null ; then
match_lhs=$(dircolors --print-database)
else
match_lhs=""
fi
[[ $'n'${match_lhs} == *$'n'"TERM "${safe_term}* ]] && use_color=true
if ${use_color} ; then
if [[ ${EUID} == 0 ]] ; then
PS1='[\033[01;31m]h[\033[01;34m] W $[\033[00m] '
else
PS1='[\033[01;32m]u@h[\033[01;34m] w $[\033[00m] '
fi
alias ls='ls --color=auto'
alias grep='grep --colour=auto'
else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
PS1='u@h W $ '
else
PS1='u@h w $ '
fi
fi
# Try to keep environment pollution down, EPA loves us.
unset use_color safe_term match_lhs
gentoo ~ # cat /etc/skel/.bashrc
# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489
if [[ -f ~/.dir_colors ]] ; then
eval $(dircolors -b ~/.dir_colors)
elif [[ -f /etc/DIR_COLORS ]] ; then
eval $(dircolors -b /etc/DIR_COLORS)
fi
alias ls='ls --color=auto'
alias grep='grep --colour=auto'
# Change the window title of X terminals
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
;;
screen)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\"'
;;
esac
gentoo ~ # cat /etc/skel/.bash_profile
# /etc/skel/.bash_profile
# This file is sourced by bash for login shells. The following line
# runs your .bashrc and is recommended by the bash info pages.
[[ -f ~/.bashrc ]] && . ~/.bashrc
gentoo ~ #
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.