@echo off
echo —=== Deleting any old LPT1-setting ===—
net use lpt1: /d
echo —=== now installing the LPT1 ===—
net use lpt1: \\IP\sharedprinter /user:”username” /persistent:yes password

install ssh
ssh root@
ssh-keygen -t rsa -N “”
cd etc/bin
vi test
Beispiel: touch /bin/backup`date ‘+%A’`
rsync -e ssh -vz -r –delete root@ /volume1/backup`date ‘+%A’`

cat ~/.ssh/id_rsa.pub | ssh root@ “mkdir -p .ssh; cat >> .ssh/authorized_keys”

rsync -e ssh -vz -r /root/.ssh/id_rsa.pub
rsync -e ssh -vz -r /root/.ssh/id_rsa.pub

chmod 755 test

vi S04crond.sh

if [ -x “$CROND” ] ; then
mkdir -p /var/spool/cron/crontabs/
cp /etc.defaults/crontab /etc/crontab <-geändert ln -sf /etc/crontab /var/spool/cron/crontabs/root echo "Starting crond..." $CROND fi ;; : stop) cd etc.defaults cp crontab crontabback vi crontab #minute hour mday month wday who command */1 * * * * root /bin/test bsp von synczh: 0 */6 * * * /home/itpenguin/u5/rsync_stuff/get_th.sh R = 4 W = 2 X = 1 - /usr/bin/rsync -e ssh -vz -r --delete root@turk.office-on-the.net:/volume1/Project/1?share/1?Projects/ /mnt/spcserver/1\ share/1\ Projects/Mirror_Region_Turkey/ 2>&1 > /mnt/spcserver/1\ share/1\ Projects/1.6\ Sync_log/mex_get_project_`date +%Y-%m-%d`.rtf

key genrieren
ssh-keygen -t rsa -N “”
id kopieren/
ssh-copy-id root@spcsaf.office-on-the.net
man ssh-copy-id

mounts anzeigen
more /home/itpenguin/.smbcredentials


ausführbar machen

chmod 755 send2_zh.sh

hier ausführen


datum ausgeben

date +%Y-%m-%d

textfile anzeigen

more /etc/crontab send2_zh.

mit Detail listen

ls -la

schauen ob crontab läuft
/etc/init.d/cron status
ps aux | grep cron

log anschauen

tail -f /var/log/lastlog
tail -f /var/log/messages
tail -f /var/log/debug

init 6 -> reboot

Mit Linux

sudo mount -t cifs -o username=xxx,password=xxx,workgroup=xxx,iocharset=utf8 //servername/hiddensharename-$ /path

mit Windows

net use q: \\servername\share /user:"username" /persistent:yes "password"

A task can usually be started and run as a background task by putting a ‘&’ at the end of the command line.

If a task was started and is running in the foreground, it is still possible to move it to the background without cancelling it. To move a task from the foreground to the background perform the following steps:

CTRL-Z (That is, while holding the CTRL key down, tap the ‘z’ key) This will suspend the current foreground job (task).
Enter the job control command ‘bg’
Tap the ‘Enter’ key
The job is now running in the background.

Useful commands to see which jobs are still running is the ‘jobs’ or the ‘ps ua’ commands. If the ‘jobs’ command is used, a background jobs can be brought to the foreground with the command fg n where n is the job (not the PID) number.

# simpel backup
# Patrick Biber
# 2010-11-02
# Version: 0.1
# first format disk to EXT3!

mount /dev/sda1 /mnt/hdbackup
mkdir /mnt/hdbackup/paede-`date +%d.%m.%Y`
touch /var/log/manualbackup/paede-`date +%d.%m.%Y`
rsync -vrpAE /home/ /mnt/hdbackup/paede-`date +%d.%m.%Y`/ > /var/log/manualbackup/paede-`date +%d.%m.%Y` 2>&1

I found this script to sort Apache logs:

if [ ! -f $1 ]; then
echo "Usage: $0 "
echo "Sorting $1"
sort -t ' ' -k 4.9,4.12n -k 4.5,4.7M -k 4.2,4.3n -k 4.14,4.15n -k 4.17,4.18n -k 4.20,4.21n $1 > $2


mail -v -s "The subject goes here" someone@somewhere.net [enter]
Hey, how's it going? [enter]
. [enter]
sendEmail -f myemail@myisp.com -t username@yahoo.com -s smtp.myisp.com -u
"Hello boss" -m "Hello boss, this is just a test message"
sudo apt-get install sendEmail
Now to send email ,
sendEmail -f FROM -t TO -s SERVER -u SUBJECT -m MESSAGE
Example :
sendEmail -f myemail@myisp.com -t username@yahoo.com -s smtp.myisp.com -u
"Hello boss" -m "Hello boss, this is just a test message"


telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 mail.postfix-howto.de ESMTP Postfix
helo localhost
250 mail
mail from: testing at example.com
250 Ok
rcpt to: tester at localhost
250 Ok
354 End data with .
some text
250 Ok: queued as B58E141D33