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

Linux ½Å±¾±àд»ù´¡(¶þ)

1.1.5 ShellÃüÁîºÍÁ÷³Ì¿ØÖÆ
ÔÚshell½Å±¾ÖпÉÒÔʹÓÃÈýÀàÃüÁ
1)Unix ÃüÁî:
ËäÈ»ÔÚshell½Å±¾ÖпÉÒÔʹÓÃÈÎÒâµÄunixÃüÁµ«ÊÇ»¹ÊÇÓÉһЩÏà¶Ô¸ü³£ÓõÄÃüÁî¡£ÕâЩÃüÁîͨ³£ÊÇÓÃÀ´½øÐÐÎļþºÍÎÄ×Ö²Ù×÷µÄ¡£
³£ÓÃÃüÁîÓï·¨¼°¹¦ÄÜ
echo "some text": ½«ÎÄ×ÖÄÚÈÝ´òÓ¡ÔÚÆÁÄ»ÉÏ
ls: ÎļþÁбí
wc –l filewc -w filewc -c file: ¼ÆËãÎļþÐÐÊý¼ÆËãÎļþÖеĵ¥´ÊÊý¼ÆËãÎļþÖеÄ×Ö·ûÊý
cp sourcefile destfile: Îļþ¿½±´
mv oldname newname : ÖØÃüÃûÎļþ»òÒƶ¯Îļþ
rm file: ɾ³ýÎļþ
grep 'pattern' file: ÔÚÎļþÄÚËÑË÷×Ö·û´®±ÈÈ磺grep 'searchstring' file.txt
cut -b colnum file: Ö¸¶¨ÓûÏÔʾµÄÎļþÄÚÈÝ·¶Î§£¬²¢½«ËüÃÇÊä³öµ½±ê×¼Êä³öÉ豸±ÈÈ磺Êä³öÿÐеÚ5¸öµ½µÚ9¸ö×Ö·ûcut -b5-9 file.txtǧÍò²»ÒªºÍcatÃüÁî»ìÏý£¬
ÕâÊÇÁ½¸öÍêÈ«²»Í¬µÄÃüÁî
cat file.txt: Êä³öÎļþÄÚÈݵ½±ê×¼Êä³öÉ豸£¨ÆÁÄ»£©ÉÏ
file somefile: µÃµ½ÎļþÀàÐÍ
read var: ÌáʾÓû§ÊäÈ룬²¢½«ÊäÈ븳ֵ¸ø±äÁ¿
sort file.txt: ¶Ôfile.txtÎļþÖеÄÐнøÐÐÅÅÐò
uniq: ɾ³ýÎı¾ÎļþÖгöÏÖµÄÐÐÁбÈÈ磺 sort file.txt | uniq
expr: ½øÐÐÊýѧÔËËãExample: add 2 and 3expr 2 "+" 3
find: ËÑË÷Îļþ±ÈÈ磺¸ù¾ÝÎļþÃûËÑË÷find . -name filename -print
tee: ½«Êý¾ÝÊä³öµ½±ê×¼Êä³öÉ豸(ÆÁÄ») ºÍÎļþ±ÈÈ磺somecommand | tee outfile
basename file: ·µ»Ø²»°üº¬Â·¾¶µÄÎļþÃû±ÈÈ磺 basename /bin/tux½«·µ»Ø tux
dirname file: ·µ»ØÎļþËùÔÚ·¾¶±ÈÈ磺dirname /bin/tux½«·µ»Ø /bin
head file: ´òÓ¡Îı¾Îļþ¿ªÍ·¼¸ÐÐ
tail file : ´òÓ¡Îı¾Îļþĩβ¼¸ÐÐ
sed: SedÊÇÒ»¸ö»ù±¾µÄ²éÕÒÌæ»»³ÌÐò¡£¿ÉÒÔ´Ó±ê×¼ÊäÈ루±ÈÈçÃüÁî¹ÜµÀ£©¶ÁÈëÎı¾£¬²¢½«½á¹ûÊä³öµ½±ê×¼Êä³ö£¨ÆÁÄ»£©¡£¸ÃÃüÁî²ÉÓÃÕýÔò±í´ïʽ£¨¼û²Î¿¼£©½øÐÐËÑË÷¡£²»ÒªºÍshellÖеÄͨÅä·ûÏà»ìÏý¡£±ÈÈ磺
½«linuxfocus Ì滻Ϊ LinuxFocus £ºcat text.file | sed 's/linuxfocus/LinuxFocus/' > newtext.file
awk: awk ÓÃÀ´´ÓÎı¾ÎļþÖÐÌáÈ¡×ֶΡ£È±Ê¡µØ£¬×ֶηָî·ûÊÇ¿Õ¸ñ£¬¿ÉÒÔʹÓÃ-FÖ¸¶¨ÆäËû·Ö¸î·û¡£cat file.txt | awk -F, '{print $1 "," $3 }'ÕâÀïÎÒÃÇʹÓã¬×÷Ϊ×ֶηָî·û£¬Í¬Ê±´òÓ¡µÚÒ»¸öºÍµÚÈý¸ö×ֶΡ£Èç¹û¸ÃÎļþÄÚÈÝÈçÏ£ºAdam Bor, 34, IndiaKerry Miller, 22, USAÃüÁîÊä³ö½á¹ûΪ£ºAdam Bor, IndiaKerry Miller, USA
2) ¸ÅÄî: ¹ÜµÀ, Öض¨ÏòºÍ backtick ÕâЩ²»ÊÇϵͳÃüÁµ«ÊÇËûÃÇÕæµÄºÜÖØÒª¡£
¹ÜµÀ ( | ) ½«Ò»¸öÃü


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

linuxÏÂftpµÄÅäÖÃ

VSFTPDµÄÉèÖÃÑ¡Ïî
¡¡¡¡VSFTPDµÄÅäÖÃÎļþ/etc/vsftpd/vsftpd.confÊǸöÎı¾Îļþ¡£ÒÔ“#”×Ö·û¿ªÊ¼µÄÐÐÊÇ×¢ÊÍÐС£Ã¿¸öÑ¡ÏîÉèÖÃΪһÐУ¬¸ñʽΪ“option=value”£¬×¢Òâ“=”ºÅÁ½±ß²»ÄÜÁô¿Õ°×·û¡£³ýÁËÕâ¸öÖ÷ÅäÖÃÎļþÍ⣬»¹¿ÉÒÔ¸øÌض¨Óû§É趨¸öÈËÅäÖÃÎļþ£¬¾ßÌå½éÉܼûºó¡£
¡¡¡¡VSFTPD°üÖÐËù´øµ ......

linuxÃüÁîÐм¼ÇÉ

ÏÈд¼¸Ìõ£¬×Ô¼º³£Óõģ¬ÒÔºóÔÙ²¹³ä£º
1. ALT + '.'
Ç°Ò»ÌõÃüÁîµÄ×îºóÒ»¸ö²ÎÊý¡£
ÀýÈ磺
µÚÒ»ÌõÃüÁls /usr/loca/£»
µÚ¶þÌõÃüÁcd /usr/local;
µÚ¶þÌõÃüÁîµÄ/usr/local£¬Ö±½Óͨ¹ýALT+'.'¼´¿ÉÊäÈë¡£
2.CTRL+'r'
ÔÚhistoryÖÐÑ°ÕÒÃüÁî
3.TAB
²¹ÆëÎļþÃû»òĿ¼Ãû
4.$ find -name '*.[ch]' | xargs grep -E 'expr' ......

Linux 2.6 ×Ö·ûÉ豸Çý¶¯³ÌÐò


Linux 2.6 ×Ö·ûÉ豸Çý¶¯³ÌÐò
¡ð¡¢ËµÃ÷
±Ê¼ÇÊÊÓÃÓÚLinuxµÄ2.6.10ÒÔºóµÄÄںˡ£
±Ê¼ÇÒÔLinux
Device
Driver3ÌṩµÄscull³ÌÐò(scullĿ¼ÖеÄmain.cºÍscull.h)Ϊ¼Ç¼Ö÷Ïߣ¬²¢ÒÔ¸ÃÇý¶¯³ÌÐòÖеĸ÷ÖÖϵͳµ÷Óúͺ¯Êýµ÷ÓÃÁ÷³ÌΪ¼Ç
¼˳Ðò¡£±ÈÈ磬module_init( )ºÍmodule_exit(
)ΪÏà¶ÔÓ¦µÄÒ»¶Ôϵͳµ÷Óã¬Ò»°ãÊé¼®Öж¼»á·ÅÔÚÒ ......

×îÐÂTurboMailÓʼþ·þÎñÆ÷Linux_°²ÌÚ°æ±¾ÉÏÊÐ

Íز¨±ü³Ð²»¶Ï¿ªÍؽøÈ¡µÄ¾«Éñ£¬ÔÚ¼¼ÊõÑз¢ºÍÖ§³ÖÉϲ»¶ÏµÄͶÈëÈËÁ¦ÎïÁ¦£¬Á¦ÇóÔÚ²»¶Ï±ä»¯µÄÊг¡ÐèÇóÖУ¬´ïµ½100%µÄ¿Í»§ÂúÒâ¶È¡£ÔÚ¸Õ¸Õ̤Èë2010Ä꣬¸ù¾Ý¹ýÍùµÄÊг¡µ÷²é£¬½áºÏ¿Í»§µÄÐèÇóºÍ½¨Ò飬Íز¨ÓʼþϵͳÍƳöÁËLinux_°²ÌÚ°æ±¾£¬×÷ΪдºË͸ø¹ã´ó¿Í»§µÄµÚÒ»·ÝÀñÎï¡£
    °²ÌÚ´¦ÀíÆ÷ÊÇ×î½üÊ®Äê²ÅÖð½¥·¢Õ¹ÆðÀ´µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ