Reinstall video card drivers after botched ubuntu kernel upgrade
This one is for my brother as each time he does a kernel upgrade ubuntu forgets to upgrade his video card it has caused both of us alot of grief, nice thing is he can boot to an older kernel version and everything is fine.
sudo apt-get get remove nvidia-current && sudo apt-get install nvidia-current
Archive to local folder split into DVD size chunks very handy
mondoarchive -O -i -p `hostname`-`date +%Y-%m-%d-%s` -d /mnt/2T -s 4470m -N -E "/dev/sdb|/dev/sdc|/home/c0mputerking/mondoarchives|mnt/2T|/var/lib/vz/dump/|/var/lib/vz/template/iso" -9
Fixing Badblocks with linux
Using fsck to find badblocks on a disk with ext filesystem
Read only this answers yes to all questions, so it is sure to finish by itself.
e2fsck -c -C -y /dev/hda1
Non-destructive read/write method this answers yes to all questions, so it is sure to finish by itself.
e2fsck -c -c -C -y /dev/hda1
Using badblocks to find badblocks on a disk with no file system
badblocks -b 4096 -p 4 -c 32768 -s /dev/hda1
badblocks -b 4096 -p 4 -c 16384 -w -s /dev/hda1
The above settings use 128 megs of RAM
# screen -fa -d -m rtorrent
For commands that run a long long time
You know the kind where you are afraid your putty session might die, window might reboot, Internet connection might break, mobile batteries might die, the city might have a black out, the world might end, or any other event that would leave you wondering did that command finish running. An example might be rsyncing a backuppc server with a couple of million files, and that uses backuppc with all those nasty cpool hardlinks can take days months years sometime never finishes no joke.
Option one and my personal favorite the script command learned this one way way back in FreeBSD 4.2 when rebuilding the world on my 486 100MHz with 16MB of RAM would literally take days. I was always impressed the hardware could stand up to this sort of abuse anyways here is the command verbatim from the good old FreeBSD manual.
Then go about your business if thing get interrupted you can just tail -f the /var/tmp/mw.out file.
Option 2 the tee command not sure if this one even works if the terminal gets disconnected therefore might not be useful. However this one comes with a loaded rsync command we are talking all the popular options, am/fm radio, air, tilt, cruise, radial tires, and leather buckets. The tee bit is at the end of course but i have not tested how durable this command is so use at your own risk or test it and let me know in the comments.
rsync -avz --delete --one-file-system --exclude /var/lib/vz/root/203/srv/samba --exclude /var/lib/vz/root/202/var/lib/backppc --progress /var/lib/vz/ /mnt/data/ | tee /home/c0mputerking/$(date+"%F_%R")-data-rsync.log
Another rsync command timed and balanced not to overload the system
time ionice -c2 -n7 rsync -avHXz --delete --one-file-system --exclude /var/lib/vz/root/203/srv/samba --exclude /var/lib/vz/root/202/var/lib/backppc --exclude /var/lib/vz/solar/venus/pc/10.22.22.200 --progress /var/lib/vz/ /mnt/data/
THis is to hopefully stop linux from abusing my harddrives kudos go out to e100 over at the proxmox forums for suggesting this to me.
This is just a linux kernel config problem.
echo 100 > /proc/sys/vm/swappiness
echo 0 > /proc/sys/vm/swappiness
The default value is 60
apache 2 ssl ubuntu 10.04
Submitted by c0mputerking on Sat, 07/28/2012 – 17:08
sudo a2enmod ssl
sudo a2ensite default-ssl