Linux Shell ±Ê¼ÇÒ»
×î½üÔÚѧϰlinux£¬ÔÚÕâÀï¸ø´ó¼ÒÍÆ¼öÒ»¸öÍøÕ¾http://linux.vbird.org/ ÉÏÃæ¹ØÓÚlinuxµÄ½Ì³ÌдµÃºÜºÃ£¬Ò²±ÜÃâÁËÎÒÔÚѧϰ¹ý³ÌÖеĺܶàÍä·¡£
³ÌÐòÒ»£ºHelloWord,ÔÚÆÁÄ»Êä³öHelloWord
ÀûÓÃvim ´´½¨Ò»¸ösh01.shÎļþ
echo -e "Hello World!\a\n"
exit 0
³ÌÐò¶þ£º½«ÊäÈë²ÎÊýÆ´½ÓºóÊä³ö
read -p "First Name:" firstname
read -p "Last Name:" lastname
echo -e "\n your full name is:$firstname $lastname"
³ÌÐòÈý£º
¸ù¾ÝÈÕÆÚ´´½¨Îļþ
echo -e "I will use touch comand to create 3 file.\n"
read -p "please input the filename what you want:" fileuser
filename=${fileuser:-"filename"}
date1=`date --date='2 days ago' +%Y%m%d`
file1="$filename""$date1"
touch $file1".log"
³ÌÐòËÄ£ºÆÕͨ¼ÆËã
[root@localhost scripts]# cat sh4.sh
read -p "first:" first
read -p "second:" second
total=$(($first*$second))
echo -e "\n========>$total"
³ÌÐòÎ壺²éÕÒÎļþ£¬Åж¨È¨ÏÞ
[root@localhost scripts]# cat sh5.sh
echo -e "input filename"
read -p "input the filename you want:" filename
test -z $filename && echo "\filename can't be null" && exit 0
test ! -e $filename && echo "file not exist!" && exit 0
test -f $filename && filetype="regulare file"
test -d $filename && filetype="directory"
test -r $filename && perm="readable"
test -w $filename && perm="$perm writable"
test -x $filename && perm="$perm executable"
echo "The filename:$filename is a $filetype"
echo "And the permission are :$perm"
³ÌÐòÁù£ºif else
[root@localhost scripts]# cat sh6.sh
echo "hello world ,shell"
[ -n "$0" ] && echo "$0" || exit 0
[ -n "$1" ] && echo "$1" || exit 0
echo "shell over!"
exit 0
#µ÷ÓÃʱ²ÉÓà sh sh6.sh par1 par2
#ÆäÖÐsh6.shΪµÚÒ»¸ö²ÎÊý
#par1ΪµÚ¶þ¸ö²ÎÊý
#$0È¡µÚÒ»¸ö²ÎÊý£¬$1È¡µÚ¶þ¸ö²ÎÊý
³ÌÐò7£ºif else(2)
[root@localhost scripts]# cat sh7.sh
read -p "yes or no (y/n)?" ny
#×¢Òâ¿Õ¸ñ£¡£¡
if [ "$ny" == "Y" ] || [ "$ny" == "y" ]; then
echo "OK,continue"
exit 0
fi
if [ "$ny" == "N" ] || [
Ïà¹ØÎĵµ£º
×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......
ºêÄÚºËÓë΢ÄÚºË
£¨
P2
£©
ºêÄںˣ¨
Monolithic
Kernel
£©²Ù×÷ϵͳµÄ
kernel
ÖмȰüº¬¹ÜÀíÓû§½ø³ÌµÄ×é¼þ£¬ÓÖ°üº¬ÏòÓû§½ø³ÌÌṩ·þÎñµÄ×é¼þ£¨ÀýÈç½ø³Ì¼äͨÐÅ¡¢É豸Çý¶¯³ÌÐò¡¢ÎļþϵͳµÈ£©£¬´Ó¶øÊ¹µÃÓû§½ø³ÌÓë²Ù×÷ϵͳ
kernel
¼ä´æÔÚ×ŵäÐ͵Ä
client/server
Ä£ÐÍ£¬µ«ÊÇÕâ ......
tar ʹÓõÄÑ¡ÏîÓУº
-c — ´´½¨Ò»¸öй鵵¡£
-f — µ±Óë -c Ñ¡ÏîÒ»ÆðʹÓÃʱ£¬´´½¨µÄ tar ÎļþʹÓøÃÑ¡ÏîÖ¸¶¨µÄÎļþÃû£»µ±Óë -x Ñ¡Ïî
Ò»ÆðʹÓÃʱ£¬Ôò½â³ý¸ÃÑ¡ÏîÖ¸¶¨µÄ¹éµµ¡£
-t — ÏÔʾ°üÀ¨ÔÚ tar ÎļþÖ ......
Platform and tools: Ubuntu 9.04
Step 1, Download the nios linux tallbal
wget http://www.niosftp.com/pub/linux/nios2-linux-20090929.tar
or use xunlei to fix it.
Step2,
tar xvf nios2-linux-20090929.tar
cd nios2-linux
./checkout
Step 3, Generate the fpga.h f ......
ÓÉÓÚ Linux Á¼ºÃµÄÓû§È¨ÏÞ¹ÜÀíÌåϵ£¬²¡¶¾ÍùÍùÊÇ Linux ϵͳ¹ÜÀíÔ±×îºó²ÅÐèÒª¿¼ÂǵÄÎÊÌâ¡£ÒÔÍù£¬Linux ÉϵÄɱ¶¾Èí¼þÖ÷ÒªÊÇΪÆóÒµµÄÓʼþºÍÎļþ·þÎñÆ÷ËùÉè¼ÆµÄ¡£Èç½ñ£¬Ëæ×Å Linux ×ÀÃæÓû§ÊýÁ¿µÄÔö³¤£¬×ÀÃæÓû§ÔÚÊÜÒæÓÚ Linux ϵͳ¶Ô²¡¶¾½ÏÇ¿µÄÌìÈ»ÃâÒßÁ¦µÄͬʱ£¬Ò²ÐèҪɱ¶¾Èí¼þÇåÀí´ÓÍøÂç»òUÅÌ´øÀ´µÄWIndows²¡¶¾¡£¾¡¹ÜÄÇЩ ......