Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linux´ÅÅ̲Ù×÷ÃüÁîÏê½â

1.·ÖÇøÓë¸ñʽ»¯Ô­Àí
Ó²Å̵ķÖÇø·ÖÖ÷MBR£¨446byte£©,Ö÷·ÖÇø±í(64byte)£¬·ÖÇø.
2.ʹÓÃlinuxÖеÄfdisk·ÖÇø
fdisk /dev/sdb
p ´òÓ¡·ÖÇø±í
t ת»»·ÖÇø±í
w д½ø·ÖÇø±í
n н¨·ÖÇø
v ¼ì²é·ÖÇø
×¢£ºfdiskʹÓÃÍêÒªÖØÐÂÆô¶¯.ÐÂÓ²Å̲»ÓÃ.
3.linuxµÄ¸ñʽ»¯Èí¼þ
mkfs-Ö§³Öext2,ext3,vfat,msdos,jfs,reiserfsµÈ
Ó÷¨1£ºmkfs -t
Àý£º££mkfs -t ext3 /dev/hdb2
Ó÷¨2£ºmkfs.
Àý£º££mkfs.vfat /dev/sdb3
mke2fs-Ö§³Öext2/ext3Îļþϵͳ
Ó÷¨£ºmke2fs [-j]
Àý£º££mke2fs -j /dev/sdb2
×¢£º mke2fs¼ÓÉÏ-jµÄ»°£¬Òâ˼ÊǼÓÈÕÖ¾£¬¾ÍÊÇext3µÄ·ÖÇø¡£
mkswap ¶Ôswap£¬ÒªÓÃmkswapÃüÁî³õʼ»¯
4.Ó²ÅÌ·ÖÇøµÄ¹ÒÔØ
¹ÒÔØÃüÁî -mount
Àý£º ££mount /dev/sdb2 /mnt/sd2
ÔØÃüÁî -umount
Àý£º ££umount /dev/sdb2
дÈë/etc/fstab
/dev/sdb2 /mnt/sd2 ext3 defaults 0 0
×¢: µÚÒ»¸ö0£¬±íÃ÷·ÖÇø¡£µÚ¶þ¸ö 0±íÃ÷linuxÆô¶¯Ê±£¬ÊÇ·ñ×Ô¼ì
¼ì²émountÐÅÏ¢
#df -T
5.ʹÓþí±ê¹ÒÔØ
Ìí¼Ó¾í±ê £­e2label
Àý£º ££e2label /dev/sdb2 test
¸ù¾Ý¾í±ê¹ÒÔØ
Àý£º ££mount LABEL=test /mnt/sd2
дÈë/etc/fstab
LABEL=test /mnt/sd2 ext3 defaules 0 0
6.ext2/ext3µÄ¹ÒÔØÑ¡Ïî
ro/rw Ö»¶Á£¯¶Áд
exec/noexec ÔÊÐí£¯²»ÔÊÐí¿ÉÖ´ÐÐ
dev/nodev ÔÊÐí£¯²»ÔÊÐíÉ豸Îļþ
suid,sgid/nosuid,nosgid ÔÊÐí£¯²»ÔÊÐísuid,sgidÎļþ
atime/noatime ¸üУ¯²»¸üнڵãµÄ·ÃÎÊʱ¼ä
async/sync Òì²½£¯Í¬²½´ÅÅÌI£¯O
user/nouser ÔÊÐí£¯²»ÔÊÐíÆÕͨÓû§¹ÒÔØ´ÅÅÌ£¬ÓÃÔÚ/etc/fstabÎļþÖеÄÑ¡Ïî
×¢£º¹ÒÔعýµÄĿ¼Ó㬣­oÑ¡Ïî¿ÉÒÔÖØйÒÔØ


Ïà¹ØÎĵµ£º

linux shell script Àý×Ó1

1. ÈçºÎ»ñµÃ½Å±¾²ÎÊý£º
#!/bin/she
#
while [ -n "$1" ]
do
case "$1" in
-a) echo "found the -a option";;
-b) param="$2"
echo "found the -b option";;
-c) echo "found the -c option";;
--) shift
break;;
*) echo "$1 is not an option";;
esac
shift
done
count ......

linux 0.11 Îļþϵͳ£¨Ò»£©

ÎļþϵͳºÍÄÚ´æ¹ÜÀí£¬ÒÔ¼°½ø³Ì¹ÜÀíÊDzÙ×÷ϵͳµÄºËÐIJ¿·Ö¡£Êý¾Ýͨ³£ÒÔÎļþµÄÐÎʽ´æ´¢ÔÚÉè ±¸ÉÏ£¬Òò´ËÎļþϵͳµÄ»ù±¾¹¦ÄܾÍÊÇÒÔijÖÖ¸ñʽ´æÈ¡/¿ØÖÆÎļþ¡£0.11°æµÄÄÚºËÖвÉÓÃÁËminix1.0°æµÄÎļþϵͳ¡£ÔÚ×îеÄ2.6°æÄÚºËÖУ¬½èÖúÓÚ VFS£¬ÏµÍ³Ö§³Ö50¶àÖÖÎļþϵͳ¡£
Ê×ÏȽéÉÜÒ»ÏÂminixÎļþϵͳ
minixÎļþϵͳºÍ±ê×¼unixÎļþϵͳ» ......

linux 0.11 Îļþϵͳ£¨¶þ£©

³¬¼¶¿éÃèÊöÁËÕû¸öÎļþϵͳµÄÐÅÏ¢£¬¶øÎļþ×÷Ϊ´æ´¢µÄ¶ÔÏó£¬ËüµÄÐÅÏ¢ÊÇÓÐinode½ÚµãÀ´ÃèÊöµÄ¡£i½ÚµãλͼÃèÊöÁËinodeµÄʹÓÃÇé¿ö¡£
struct m_inode{
        unsigned short i_mode; //ÎļþÀàÐÍ
        unsigned short i_uid;//ÎļþËÞÖ÷
......

linux 0.11 Îļþϵͳ£¨Èý£©

Ŀ¼ÏîºÍ³¬¼¶¿é£¬½ÚµãµÄ¸ÅÄͬ£¬ËüÔÚÉ豸ÉÏûÓжÔÓ¦µÄ´ÅÅÌÊý¾Ý½á¹¹¡£Ïà·´£¬ËüÊÇĿ¼ÎÄ ¼þµÄÒ»²¿·Ö¡£linuxÖÐĿ¼ҲÊÇÒ»ÖÖÎļþ£¬ÀàÐÍÊÇ'd'¡£µ«ÊÇĿ¼ÖеÄÄÚÈݺÍÆÕͨÎļþ²»Í¬£¬ËüÊÇÓÉĿ¼Ïî×é³ÉµÄ¡£×¢ÒâĿ¼Ïî²»ÊÇĿ¼¡£ÎÒÃǾ­³£Ó÷¾¶Ãû Ö´ÐÐÏà¹Ø²Ù×÷£¬Ä¿Â¼Ïî¾ÍÊÇΪÁ˲éÕÒ·½±ãµÄ¡£
struct dirt_entry{
    ......

LinuxÖ÷ÒªshellÃüÁîÏê½â

s
hellÊÇÓû§ºÍLinux²Ù×÷ϵͳ֮¼äµÄ½Ó¿Ú¡£LinuxÖÐ
ÓжàÖÖshell£¬ÆäÖÐȱʡʹÓõÄÊÇBash¡£±¾Õ½²ÊöÁËshellµÄ¹¤×÷Ô­Àí£¬shellµÄÖÖÀ࣬shellµÄÒ»°ã²Ù×÷¼°BashµÄÌØÐÔ¡£
¡¡¡¡Ê²Ã´ÊÇshell
¡¡¡¡LinuxϵͳµÄshell×÷Ϊ²Ù×÷ϵͳµÄÍâ¿Ç£¬ÎªÓû§Ìá
¹©Ê¹ÓòÙ×÷ϵͳµÄ½Ó¿Ú¡£ËüÊÇÃüÁîÓïÑÔ¡¢ÃüÁî½âÊͳÌÐò¼°³ÌÐòÉè¼ÆÓïÑÔµÄͳ³Æ¡£
¡¡¡¡s ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ