Login as root and execute 'grub' command in terminal/console. prompt will change to 'grub>'
execute md5crypt to generate password hash.
code:
grub> md5crypt

it will prompt you for password, enter the password which you are going to set for GRUB. it will display encrypted password hash.
code:
Password: ******
Encrypted: $1$jxcdN0$hVHViq1aiPf8FziuGJGZp0
note down encrypted password hash and exit grub mode:
code:
grub> quit
edit /boot/grub/grub.conf file and insert encrypted password in between "splashimage" and "title" lines
code:
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
password --md5 [password-hash]
title CentOS 5
save edited file and reboot.
Người đăng: Linh Phan

Kaspersky Antivirus 2009 version 3PC: 520k
Kaspersky Antivirus 2009 version 1PC: 180k
Kaspersky Internet Security 2009 version 3PC: 760k
Kaspersky Internet Security 2009 version 1PC: 270k

Giá cho version 7.0 tương tự như trên
(Bản quyền có thời hạn trong 1 năm)

Liên hệ: Tư vấn và mua hàng
ĐT: 0908.620.659 (Linh)
YM: phanlinh@ymail.com
Email: pttlink@gmail.com


Người đăng: Linh Phan
Find là một lệnh cơ bản mà hầu như ai sử dụng Linux cũng biết. Nhưng không phải ai cũng khai thác hết công dụng của lệnh này. Sau đây là 10 cách dùng lệnh find một cách hữu ích. Ở đây tôi giả sử ta cần tìm kiếm trong thư mục $HOME.

1. Tìm những thư mục rỗng
find $HOME -depth -type d -empty
2. Tìm những file rỗng
find $HOME -depth -type f -empty
3. Tìm một file với tên xác định
find $HOME -name [name_of_file]
4. Tìm file với phần mở rộng xác định
find $HOME -name “*.[given_extension]”
5. Tìm file với những quyền truy cập xác định
find $HOME -perm [permission bits]
VD: Tìm những file .txt với quyền truy cập 644
find $HOME -name ‘*.txt’ -perm 644
6. Tìm file với một số bit permission biết trước, không quan tâm phần còn lại
find $HOME -perm -[permision_bits]
VD:
find $HOME -name ‘*.txt’ -perm -644
Lệnh này sẽ tìm những file với permission bit là 644 nhưng cũng có thể là 777 hay những giá trị “lớn hơn” 644.
7. Tìm file với kích thước xác định
find -size n[cwbkMG]
Phần trong [] là đơn vị tính kích thước. Lệnh trên sẽ tìm những file có kích thước từ (n-1) đến n.
‘b’ for 512-byte blocks (this is the default if no suffix is used)
‘c’ for bytes
‘w’ for two-byte words
‘k’ for Kilobytes (units of 1024 bytes)
‘M’ for Megabytes (units of 1048576 bytes)
‘G’ for Gigabytes (units of 1073741824 bytes)
VD:
find $HOME -name ‘*.txt’ -size 4k -exec ls -lh {} \;
Sẽ liệt kê những file có kích thước từ 3-4k có đuôi .txt.
Tùy chọn -exec sẽ thực thi những lệnh theo sau (ls).
8. Tìm file với tên xác định và phần mở rộng tùy ý
find -name ‘[given_name].*’
9. Tìm file được chỉnh sửa trong thời gian gần đây (theo từng block 24h)
find -mtime n
Với n có giá trị:
0 for the last 24 hours
1 for the last 48 hours
2 for the last 72 hours
và cứ vậy tính lên.
10. Tìm những file được truy cập trong thời gian gần đây (theo từng block 24h)
find -atime n
Với n tính như trên.
11. Để tìm nội dung trong 1 file ta có thể dùng lệnh sau
grep -R "hautp" vnlamp.txt

Tham khảo “man find” để biết thêm chi tiết.
Người đăng: Linh Phan
Visit the Site
MARVEL and SPIDER-MAN: TM & 2007 Marvel Characters, Inc. Motion Picture © 2007 Columbia Pictures Industries, Inc. All Rights Reserved. 2007 Sony Pictures Digital Inc. All rights reserved. blogger templates