บทความ

กำลังแสดงโพสต์จาก 2009

ตั้งค่า restart server อัตโนมัติ โดยใช้ crontab

crontab -e แล้วเพิ่มข้อความ 00 00 * * * /sbin/reboot หรือ 00 00 * * * /sbin/shutdown -r now อันนี้ reboot ทุกเที่ยงคืน เปลี่ยนเวลาเอาเองนะครับ ------------------------------------------- นาที ชั่วโมง วันที่ เดือน วันในสัปดาห์ คำสั่ง * * * * * คำสั่ง นาที 0-59 ชั่วโมง 0-23 0=เที่ยงคืน วันที่ 1-31 เดือน 1-12 วันในสัปดาห์ 0-6 0=วันอาทิตย์ ดูรายละเอียด crontab crontab -l เพิ่มเติม Howto Set-up a Crontab File Yesterday I mainly worked on some PHP backup scripts [not very exciting, but necessary.] The scripts are run at regular intervals and perform various data backups across numerous domains. To accomplish this I set-up some cron jobs that will automatically execute the scripts at set intervals. This is not the first time that I've had to set-up cron jobs [I've got several that date back a few years.] I think that having the ability to set-up scheduled tasks is really quite important. Therefore I thought I'd blog about it for future refer...

วิธี uninstall package apt-get

you are right, 'apt-get remove' does not do the job throughly, the solution to your problem, IMHO, can be solved this way, which is what i do in order to remove everything pertaining to the package in question: apt-get install deborphan debfoster #apt-get remove --purge package #apt-get clean the later will clean the /var #debfoster will show files and libraries still left after the apt-get remove --purge, if you don't recognize a library, keep it, later on, deborphan will give you a list of 'orphaned' libraries that are hanging with no use, and are safe to nuke. if you make a mistake with debfoster, type 'u' and will ask you again if you want to keep it. When you are thru with it, invoke deborphan. #deborphan will give a list of libraries that are hanging just taking space, to get rid of them: #deborphan | xargs apt-get -y remove purge when thru with that: #apt-get clean recently after a dist-ugrade to sid, it installed emacs21, i removed it, and debfoster...