Einige UNIX-Befehle
für den Administrator:
Dateien zählen:
find . -type f | wc -l
gefunden bei:
http://askubuntu.com/questions/34099/find-number-of-files-in-folder-and-sub-folders
Freier
Platz des Servers:
$ du -c
This gives you a grand total as the last line of the output. So if your
directory occupies 30MB the last 2 lines of the output would be
Read more: http://linuxpoison.blogspot.de/2008/04/how-to-find-size-of-directory-free-disk.html#ixzz37WTrO2kk
bzw. du -c > du20140715.txt
gefunden bei:
http://www.codecoffee.com/tipsforlinux/articles/22.html
bestimmte Sätze aus dem Zugriffslog auswählen:
nur solche Sätze, bei denen ein bestimmter Begriff vorkommt: z.B. wittelsbacher
cat access.log.31 | grep wittelsbacher > wittelsbacher.31
nur solche Sätze, bei denen ein bestimmtes Directory vorkommt: z.B. /dokus/
cat access.log.31 | grep "/dokus/" > dokus.31
nur solche Sätze, bei denen ein Passwort notwendig ist: ergibt
alle Sätze mit irgendeinem passwort (also verschieden vom Wert "-
-"
cat access.log.19 | grep -ve "- -" > password.19
nur solche Sätze, bei denen ein Passwort notwendig ist: ergibt alle Sätze mit passwort hwember
cat access.log.19 | grep -e "- hwember" > password.hwember
Mehrere Wochendateien zu einer Monatsdatei zusammenfassen:
paste -s access.log.19 access.log.20 access.log.21 access.log.22
>access.log.mai
zurück zur Übersicht
Änderungsstand: 07-Jun-2021
Heinz Wember