Hallo,
ich habe ein kleines Skript aus einem Buch in .bashrc abgeschrieben . Es funktioniert nicht optimal !
Code
thierry@toto-PC:~> grep -v '#' .bashrc
test -s ~/.alias && . ~/.alias || true
ds () {
echo "Disk Space Utilization For $HOSTNAME"
df –h
}
Alles anzeigen
Es geht um die Funktion ds.
Das Ergebnis:
Code
thierry@toto-PC:~> ds
Disk Space Utilization For toto-PC
df: –h: Datei oder Verzeichnis nicht gefunden
Warum bekomme ich diese Meldung ?
Direkt in dem Shell läuft alles gut:
Code
thierry@toto-PC:~> df -h
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
devtmpfs 4,0M 0 4,0M 0% /dev
tmpfs 2,9G 0 2,9G 0% /dev/shm
tmpfs 1,2G 18M 1,2G 2% /run
tmpfs 4,0M 0 4,0M 0% /sys/fs/cgroup
/dev/sdb6 30G 18G 11G 64% /
/dev/sdb8 409G 291G 98G 75% /mnt/Dateien_Arbeit
/dev/sdb7 62G 46G 14G 78% /home
/dev/sda1 585G 421G 164G 72% /mnt/Nouveau_Nom
tmpfs 594M 72K 594M 1% /run/user/1000
Alles anzeigen
danke für Ihre Hilfe.