Wednesday, December 14, 2011

Subnet

Host (ISP): 151.151.0.0/25
First subnet: 151.151.0.128 ! why not 151.151.0.0? Because it assigned to Host(ISP) it is not a subnet.
2nd: 151.151.1.0
...

Host range: 1st: 151.151.0.129 - 151.151.0.254  (255 is Broadcast)
151.151.0.1-151.151.0.126 are belong to 151.151.0.0.


Tuesday, December 13, 2011

Schedule tasks on Linux using crontab

The power of computer is capability of doing thing automatically.  So let auto everything you can. On Linux, using crontab is a must essential knowledge! ~HVN~

If you've got a website that's heavy on your web server, you might want to run some processes like generating thumbnails or enriching data in the background. This way it can not interfere with the user interface. Linux has a great program for this called cron. It allows tasks to be automatically run in the background at regular intervals. You could also use it to automatically create backups, synchronize files, schedule updates, and much more. Welcome to the wonderful world of crontab.

Crontab

The crontab (cron derives from chronos, Greek for time; tab stands for table) command, found in Unix and Unix-like operating systems, is used to schedule commands to be executed periodically. To see what crontabs are currently running on your system, you can open a terminal and run:
sudo crontab -l
To edit the list of cronjobs you can run:
sudo crontab -e
This wil open a the default editor (could be vi or pico, if you want you can change the default editor) to let us manipulate the crontab. If you save and exit the editor, all your cronjobs are saved into crontab. Cronjobs are written in the following format:
* * * * * /bin/execute/this/script.sh

Sunday, December 11, 2011

Fixbug ko mở được biểu tượng "computer"

Nếu máy bạn gặp phải lỗi :
Nautilus cannot handle "computer" locations.
khi bấm vào biểu tượng computer. Đi kèm là các triệu chứng : không auto mount USB và CDROM. Cách fix như sau:
bạn tạo một thư mục /usr/local mới rồi khởi động lại máy. Câu lệnh dưới backup thư mục cũ vào tạo thư mục mới:

sudo mv /usr/local /usr/local.old
sudo mkdir /usr/local


Friday, December 2, 2011

Because It’s Fun!

Twelve years ago, computers were a mystery to me, but a friend of mine showed me how I could just go down to the computer parts store, pick out a motherboard, CPU, RAM, hard drive, power supply, &c., and put it together myself. It was so empowering! Those mysterious black boxes that our lives depend on were one step less mysterious.
I learned how to download Linux and install it myself for free — then, FreeBSD and OpenBSD. Then, I was building my own servers. Now, the whole web server/Internet thing was less of a mystery. This was, again, fascinating and empowering.
Ten years ago, I was the founder/owner/CEO of a music distribution company that grew from just me to 85 employees.
As the company grew, I enjoyed building all of the office PCs and web servers myself. I enjoyed setting up the same FreeBSD distribution for everyone, and writing shell scripts to automate the installation of everything. It was a fun challenge, and I’d often stay until midnight setting these things up, totally “in the zone” and loving it.