- sudo /etc/init.d/apache2 stop oder start
- logs sieht man mit tail /var/log/apache2/error.log
- /etc/apache2/httpd.conf enthält die primäre Config
diff:
diff -Z a b
compare (show differences) between the files a and b. -Z = ignore trailing space (at end of line)
Disk Cleanup
- synaptic package manager → settings → files: delete cached package files (und Anpassen, dass er nicht mehr solange cache'd) ⇒ 1GB
- update manager → view → linux kernels: alte löschen (ausser letzem und aktivem) ⇒ 4GB (400MB pro Kernel)
- ~/.gimp2-8/swap.. gelöscht &rARR; 1.1GB
sudo find ! -user walter -exec ls -l {} \;
find all files with user not walter and do an ls -l on itsudo find ! -user walter -exec chmod 775 {} \;
find all files with user not walter and chmod itsudo find ! -user walter -exec chown walter:walter {} \;
find all files with user not walter and chown it
hardware
sudo lshw -html > hardware.html
ganze config
interrupts statistic:
while true ; do { { date; cat /proc/interrupts ; } >>int.txt ; sleep 60 ; } done
mount | grep windows
cat /etc/fstab
sudo mount -o remount,rw /windows
windows rw mounten (oder ro- mount wlkl.ch ftps sftp://wlkl.ch@wlkl.ch:5544/
sshfs 'wlkl.ch@login-97.hoststar.ch:' /media/walter/wlklSftp -p 5544 -o sshfs_debug -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -d
-d=debug switches to foreground mode- ftp
curlftpfs ftp://web15:pw@wlkl.ch/ /wlklFtp
- mount spwallisellen ftps
sshfs 'spwallisellen.ch@login-2.hoststar.ch/:' /media/walter/spwSftp -p 5544 -o sshfs_debug -d
-d=debug switches to foreground modesudo umount /media/walter/spwSftp
mkdir /media/walter/spwSftp
- ftp:
curlftpfs 'ftp://spwallisellen.ch:pw@login-2.hoststar.ch/' /spwFtp
sudo fdisk -l
und device Namen merken- sudo ntfsfix /dev/<device name>!
rdiff-backup
rdiff-backup -l /wkArchive/backupData/pc/cmp.php
list increment (timestamps) for given file/directorysudo rdiff-backup --remove-older-than 2Y backupArchive
remove increments older 2 yearssudo rdiff-backup -r 2019-02-19T11:11:28+01:00 /wkArchive/backupData/pc tmp
restore source dir/file from given time to tmp
release anzeigen mint, ubuntu)
cat /etc/*-release
- sudo rsync -rlptD --del /media/walter/Seagate1805/fromElements/backupAll/ /media/walter/Element0805/backupAll/
- -a abbreviates -rlptgoD however gives chown or chgrp Operation not permitted (1) errors (although sudo, but reason is probably that destination is Fat32, which has neither owner nor group), thus without -og
- test to synchronize directories (only files and directories, ignore links) ==>
cd /wkData/pc; rm -r tstC/*; cp -ar tstOri/cmp1 tstOri/cmp2 tstC/
- update cmp1 to equal cmp2
rsync -niir --del tstC/cmp2/ tstC/cmp1/
(-n == --dry-run)
- update cmp1 to equal cmp2
- test to create a directory cmpD, with only the updates from cmp1 to cmp2
rm -r tstC/cmpD
rsync -ndiir --prune-empty-dirs --del --compare-dest=../cmp1/ tstC/cmp2/ tstC/cmpD/
but we get two problems- the things to delete art not even mentioned
- empty dirs are created, inspite of --prune-empty-dirs
scp
scp -rp * scp://wlkl.ch@lx13.hoststar.hosting:5544/files/tmp; echo exitStatus $?
copy from/to/between remote using sftp und ssh
sshpass -f /wkData/wk/extra/wlklsftp scp -rp scp://wlkl.ch@lx13.hoststar.hosting:5544/files/tmp . ; echo exitStatus $?
um Passwort aus script mitzugeben oder mit -p...
- Man:bash
fc -e xed -999 0
edit history - contents of file will be executed at exit! (or set FCEDIT=xed in bash .profile)
sudo sysctl vm.swappiness=0
swap ausschalten
top display of current system usage, cpu% per task etc, with many configuration and manipulation commands
top -b -d5 > top5
batchmode, delay=5sec ouput to file
lsusb
nur USBs anzeigenssh ssh://ch45859@lx13.hoststar.hosting:22888
# [user@]hostname[:port]. nachdem im mypanel ssh für eine Stunde aktiviert und Angaben inkl. Paswort von dort benutzensudo lshw -html > hardware.html
ganze config- seatools auf windows für Seagate USB External drive diagnostics
wget wget brauchen um Homepage zu archivieren, wiki zu synchronisieren etc.
wk13
- /media/walter/Element0805
- /media/walter/Seagate1805
- tcp/ip adress http://192.168.1.135
uname -a
current kernel version etc.
zip -r www ttt
create www.zip by recursively adding file from directory tttzip -FSr www.zip ttt /wkData/www
recursively file sync archive www.zip (add new, update changed, delete nolonger existing files) from the two given directoriesunzip -l www
list files in www.zip