Mac OS X (Tiger)
|
 |
|
System BOOT Tastenkombinationen
|
| Alt |
|
Es erscheint eine Auswahl der
Bootfähigen Datenträger |
| Alt |
C |
Boot von CD-ROM |
| Alt |
T |
Boot als Target Firewire Device |
| Apfel |
|
|
| |
|
|
| Apfel |
V |
Verbose Modus |
| |
|
|
| |
|
|
|
ScreenShot Tastenkombinationen
|
| |
Apfel |
Shift
|
3 |
Screen to PDF-File on Desktop |
| Ctrl |
Apfel |
Shift |
3 |
Screen to PDF-File to Clipboard |
| |
Apfel |
Shift |
4 |
Screen Region to PDF-File on Desktop |
| Ctrl |
Apfel |
Shift |
4 |
Screen Region to PDF-File to Clipboard |
|
|
System Messages
|
# tail
-f /var/log/system.log
Siehe auch das Script "sl"
(weiter unten auf dieser Seite)
|
|
Property List Editor
(convert *.plist - files)
|
# plutil -convert [format] /Pfad/zur/Datei/Datei.plist
format = xml1 oder binary1
|
|
List open files
|
# lsof
# lsof -c /openvpn
|
|
talk about something
|
# say -v Fred Talk about something
# say -v Agnes Talk about something
# say -v Vicky Talk about something
# say -v Victoria Talk about something
|
|
Firewall
|
Flying Buttres
|
|
rsync (external HDD)
|
#!/bin/bash
#
=====================================================================
# Filename ........... : /Users/scripts/sync_Shared
# Author ............. : Michael Fischer
# Creation Date ...... : 09.04.2006
# Function ........... : This Script will sync /Users/Shared
# Modification ....... : xx.xx.2006
#
---------------------------------------------------------------------
# switch on the script debug option
#
---------------------------------------------------------------------
# set -x
#
---------------------------------------------------------------------
# set some parameters
#
---------------------------------------------------------------------
src_system="skoda"
dst_system="skoda"
sync_path="/Users/Shared"
excl_file="/Users/scripts/sync_ext_HDD_exclist.tmp"
#
---------------------------------------------------------------------
# create exclude file
#
---------------------------------------------------------------------
echo --exclude "VirtualPC_DOS.vpc7" >$excl_file
echo --exclude "VirtualPC_XP.vpc7" >>$excl_file
echo --exclude "Video_VCD_SVCD"
>>$excl_file
set -x
ec_parm=" --exclude-from="$excl_file" "
#
---------------------------------------------------------------------
# execute script
#
---------------------------------------------------------------------
cd $sync_path
if [ "$1" = "-f" ]
then
PARM_A=" -av"
# chown -R michael *
# chgrp -R michael *
else
echo "Ohne Parameter -f gestartet, daher nur Test ... "
sleep 2
PARM_A=" -avn"
fi
rsync $PARM_A * $ec_parm /Volumes/MAC/Shared
#
---------------------------------------------------------------------
# unset some parameters
#
---------------------------------------------------------------------
src_system=
dst_system=
sync_path=
ec_parm=
#
---------------------------------------------------------------------
# end of procedure
#
---------------------------------------------------------------------
echo $0': Proc has ended. '
|
|
curl_apple_geeks (get WEB Content)
|
#!/bin/bash
issue=$(curl -s http://www.applegeeks.com | \
grep '.jpg"\ width' | \
awk '{print $2}' | \
sed -e 's/src=\"\/comics\///' | \
sed -e 's/\"//' | \
sed -e 's/src=\/webcam\/hawkeye_thumb.jpg"//' | \
sed -e 's/ //')
url="http://www.applegeeks.com/comics/$issue"
ziel="/Users/Shared/Bilder/Webcomics/$issue"
echo "$url"
wget -c $url
|
|
expect
|
#!/usr/bin/expect
# ----------------------------------------------------
# ccc
# ----------------------------------------------------
log_file -a expect1.log
set rem_host [lindex $argv 0]
set passw [lindex $argv 1]
if {$argc!=2} {
send_error "Usage: $argv0 RemoteHost Passwort \n"
exit 1;
}
spawn telnet [lindex $argv 0]
expect "dbox*login:"
send "$passw\r"
interact
|
|
Streameditor "sed"
|
#!/bin/sh
# ------------------------------------------------------------------
# First of all Remove Blanks in Filenames ...
# Attention: Runs without any Confirmation !!
# ------------------------------------------------------------------
for e in *; do mv "$e" "`echo $e | sed -e 's/\ /_/g'`"; done
# ------------------------------------------------------------------
# End of File
# ------------------------------------------------------------------
|
|
#!/bin/sh
# ------------------------------------------------------------------
# First of all: Remove Blanks in Filenames ...
# Second: : Change "_-_" into a single "-"
# ------------------------------------------------------------------
# ------------------------------------------------------------------
# Check Directory
# ------------------------------------------------------------------
# set -x
MP3_Dir=$(pwd | cut -c 1-19)
echo $MP3_Dir
if [ $MP3_Dir != "/Users/Shared/Musik" ]
then
echo "This is the wrong directory. Script will do nothing!"
exit 4
else
echo "Removing Blanks in progress ... "
for e in *; do mv "$e" "`echo $e | sed -e 's/\ /_/g'`"; done
for e in *; do mv "$e" "`echo $e | sed -e 's/_-_/-/g'`"; done
echo "Removing Blanks is done"
fi
# ------------------------------------------------------------------
# End of File
# ------------------------------------------------------------------
|
| |
|
dhcp - Server
/etc/dhcpd.conf
|
#
======================================================================
# Filename ........... : /etc/dhcpd.conf
# Creation Date ...... : 30.01.2006
# Function ........... : config-file for dhcp server
# Modification ....... : 30.01.2006 - add WebServer
# Other files ........ : /etc/hostconfig
#
: /Library/StartupItems/DHCP/DHCP
# Command ............ : SystemStarter -v start/stop DHCP
#
======================================================================
option domain-name "privat.lan";
option domain-name-servers 192.168.0.1;
default-lease-time 6000;
max-lease-time 72000;
# authoritive;
ddns-update-style ad-hoc;
log-facility local7;
# log-facility local7; /var/log/dhcpd.log
# log-facility local7 /var/log/dhcpd.log
subnet 192.168.0.0 netmask 255.255.255.0
{
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
range 192.168.0.190 192.168.0.198;
host notebook { hardware ethernet 00:1e:12:13:aa:a1;
fixed-address 192.168.0.10; }
host desktop { hardware ethernet 00:12:12:15:01:ea;
fixed-address 10.0.10.131; }
}
|
|
IP Forwarding
|
#
======================================================================
# Filename ........... : /etc/sysctl.conf
# Creation Date ...... : 30.01.2006
# Function ........... : switch on permanent ip-forwarding / routing
#
======================================================================
net.inet.ip.forwarding=1
Switch on routing temporary
# sysctl -w net.inet.ip.forwarding=1 |
|
Script: do something with entries
out of a textfile
|
#
======================================================================
# Filename ........... : script
# Creation Date ...... : 30.04.2006
# Function ........... :
#
======================================================================
#!/bin/sh
for i in `cat liste`
do
tar cvf /Users/Shared/i$.tar /Users/Fotos/$i/*
rm -ri /Users/Fotos/$i/*
end
#
|
|
DNS Server
|
Some files are needed:
1 ....... : /System/Library/StartupItems/BIND/BIND
2 ....... :
/System/Library/StartupItems/BIND/StartupParameters.plist
3 ....... :
/System/Library/StartupItems/BIND/Resources/...
...German.lproj/Localizable.strings
4 ....... :
/System/Library/StartupItems/BIND/
#!/bin/sh
# ------------------------------------------------------------------
#
# BIND name service
# ------------------------------------------------------------------
#
. /etc/rc.common
if [ "${DNSSERVER:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting BIND-9 named"
# /usr/local/bind9/sbin/named -d 3 -c /etc/named.conf
/usr/local/bind9/sbin/named -c /etc/named.conf
fi
# ------------------------------------------------------------------
#
# end of file
# ------------------------------------------------------------------
#
# ------------------------------------------------------------------
#
# StartupParameter.plist
# ------------------------------------------------------------------
#
{
Description = "DNS server";
Provides = ("BIND");
Requires = ("Network");
Uses = ("Network");
OrderPreference = "None";
Messages =
{
start = "Starting BIND DNS service";
stop = "Stopping BIND DNS service";
};
}
# ------------------------------------------------------------------
#
# end of file
# ------------------------------------------------------------------
#
Und so startet man den DNS
Dienst:
# SystemStarter -v start BIND
Im Syslog erscheint dann:
... SystemStarter[15437]: lstat("tartupItems"): Not a directory
... Skoda SystemStarter[15437]: lstat("braryems"): Not a directory
... Skoda named[15444]: starting BIND 9.3.2 -c .conf
... Skoda named[15444]: extra data in root hints 'zone.hints'
... Skoda named[15444]: command channel listening on 127.0.0.1#953
Das folgende Command zeigt
die Versionsnummer an:
# dig @skoda version.bind TXT CHAOS
...
version.bind. 0 CH TXT "9.3.2"
...
Erst nach dem Einbringen
von einer Zeile in die Sektion "options":
options
...
version "[MiFi Secured]";
...
verschleiert man die wahre
Versionsnummer:
# dig @skoda version.bind TXT CHAOS
...
version.bind. 0 CH TXT "[MiFi Secured]"
...
|
|
LSCOLORS
|
CLICOLOR=true
LSCOLORS=FxGxdxhxcxbxexcxcxFxFx # Rot
#LSCOLORS=hxfxcxdxBxegedabagacad # Grau/Weiss
#LSCOLORS=ExGxFxdxCxDxDxBxBxExEx # Blau
TERM=xterm-color
#
=======================================================================
# export Variables
#
=======================================================================
export TERM CLICOLOR LSCOLORS
|
|
|
#
#
|
|
|
|