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

LinuxС¼¼ÇÉÊÕ¼¯

LinuxС¼¼ÇÉÊÕ¼¯
Ç°ÑÔ£ºÒòΪÓÃLinuxµÄʱ¼äÔ½À´Ô½³¤£¬ËùÐèÒª×öµÄÊÂÒ²Ô½À´Ô½¶à£¬Ð§ÂʳÉÁËÎÒ±ØÐèÍ»ÆƵÄÆ¿¾±¡£ÔÚ´Ë×ܽáÒ»ÏÂÕâ¶Îʱ¼äÓùýµÄһЩºÃµÄLinux¼¼ÇÉ¡£ÒÔºóʱ³£²¹³äÕâÑù×Ô¼ºÒªÓõÄʱºò¾ÍºÜ·½±ãÁË¡£
Author:Ajian
[Îı¾´¦Àí]
1¡¢²é¿´Ä³ÎļþµÄÒ»²¿·Ö
Èç¹ûÄãÖ»Ïë¿´ÎļþµÄÇ° 5 ÐУ¬¿ÉÒÔʹÓà head ÃüÁ
È磺head -5 /etc/passwd
Èç¹ûÄãÏë²é¿´ÎļþµÄºó 10 ÐУ¬¿ÉÒÔʹÓà tail ÃüÁ
È磺tail -10 /etc/passwd
²é¿´ÎļþÖмäÒ»¶Î£¬¿ÉÒÔʹÓà sed ÃüÁî
Èç:sed –n '5,10p' /etc/passwd ÕâÑùÄã¾Í¿ÉÒÔÖ»²é¿´ÎļþµÄµÚ 5 Ðе½µÚ 10 ÐÐ
2¡¢½« file.txt ÀïµÄ123¸ÄΪ 456
·½·¨ 1
sed 's/123/456/g' file.txt > file.txt.new    Ð޸ĵı£´æµ½ÆäËüÎļþ
sed -i 's/123/456/g' file.txt   Ö±½ÓÐÞ¸ÄÔ­Îļþ
·½·¨ 2
vi file.txt
ÊäÈëÃüÁ
:%s/123/456/g
×¢Ò⣺Èç¹ûÌæ»»µÄÎļþÓÐÌØÊâ·ûºÅÈç/¾ÍÒªÓÃ\À´È¡Ïû¡£
Àý£ºsed -i 's/\/usr\/local\/apache2\/htdocs/\/var\/www\/html/g' /usr/local/apache2/conf/httpd.conf
Èç¹ûÖ»ÊÇÏÂÔ­ÓеÄÐкóÌí¼Ó¾ÍÓÃ&
Àý£ºsed -i 's/DirectoryIndex index.html index.html.var/& index.htm index.php /g' /usr/local/apache2/conf/httpd.conf
3¡¢echo µäÐÍÓ¦ÓÃ
echo "abcdefg" | perl -lne '{$a = reverse($_); print $a;}' °ÑÒ»¸ö×Ö·û´®·­×ª
echo bottle|rev °ÑÒ»¸ö×Ö·û´®·­×ª
4¡¢¹ýÂ˵ô#ºÅ´òÍ·µÄÐУ¬ºÍËùÓеĿÕÐУ¨¶ÔÓڲ鿴ÅäÖÃÎĵµºÜÓÐÓã©
awk '/^[^#]/&&/^[^$]/' filename > new.file
[ÎļþĿ¼¹ÜÀí]
1¡¢É¾³ý¼¸ÌìÒÔÇ°µÄËùÓж«Î÷(°üÀ¨Ä¿Â¼ÃûºÍĿ¼ÖеÄÎļþ£©
1) find . -ctime +3 -exec rm -rf {} \;
2) find ./ -mtime +3 -print|xargs rm -f –r
2¡¢Ôڶ༶Ŀ¼ÖвéÕÒij¸öÎļþµÄ·½·¨
1) find /dir -name filename.ext
2) du -a | grep filename.ext
3) locate filename.ext
3¡¢É¾³ýÈíÓ²Á¬½Ó×¢Òâµã
ɾ³ýÈí¼þÁ¬½ÓµÄʱºòÒ»¶¨Òª¼ÇµÃ²»ÒªÔÚɾ³ýµÄÎļþ¼Ðºó¼Óһб¸Ü,
rm -f   filename/   
»á˵ÕâÊÇÒ»¸öÎļþ¼Ð²»ÄÜɾ³ý
rm   filename
»áÌáʾ˵ÊÇ·ñҪɾ³ýÕâ¸öÁ¬½Ó¡£
Èç¹ûÓõĵÚÒ»ÖÖ¿ÉÄÜ»á°ÑÆäËüÎļþ¶¼É¾³ý
4¡¢É¾³ýĿ¼Öк¬ÊäÈë¹Ø¼ü×ÖµÄÎļþ
find /mnt/ebook/ -type f -exec grep "ÔÚ´ËÊäÈë¹Ø¼ü×Ö" {} \; -print -exec rm {} \;
5¡¢ÔÚµ±Ç°Ä¿Â¼Ï½âѹ rpm Îļþ
cat kernel-ntfs


Ïà¹ØÎĵµ£º

Linux¶àÏ̱߳à³ÌºÍLinux 2.6ϵÄNPTL


ÊÐÃæÉÏÓеÄÒ»±¾½éÉܶàÏ̵߳ÄÊ顶Posix ¶àÏ̱߳à³Ì¡·£¬ËüÊÇÓ¢Îİ桶Programming with POSIX Muiltthread¡·ÖÐÒë±¾£¬ÕâÒ²ÊÇ°ëÄêÇ°ÎÒËùÄÜÕÒµ½µÄΨһרÌâ½éÉܶàÏ̱߳à³ÌµÄÊé¡£ÎÒ¸öÈ˸оõÕâ±¾ÊéµÄÇ°Ãæ1/3Ö®Ò»µÄÄÚÈÝдµÄ»¹ÊDz»´íµÄ£¬µ«ÊǺóÃæµÄ¶«Î÷¾Í·Ç³£»Þɬ²¢ÇÒÓкܶàÃ÷ÏÔµÄÎÄ×Ö´íÎ󡣿´¿´Õâ±¾ÊéµÄ·­ÒëÕßÊǺü¸¸öÈË£¬¹À¼Æÿ¸öÈ ......

linuxϵͳ¹¤³ÌʦÃæÊÔÌâ(¸½´ð°¸)

1.²é¿´Linuxϵͳµ±Ç°µ¥¸ö¹²ÏíÄÚ´æ¶ÎµÄ×î´óÖµ£¨ÃüÁ
ipcs -m
ipcs -a
2.ÓÃʲôÃüÁî²éѯָ¶¨IPµØÖ·µÄ·þÎñÆ÷¶Ë¿Ú
ÌâÒâÓ¦¸ÃÊÇ nmap ºÍnbtscan ÃüÁîÀ´É¨°É¡£
3.crontabÖÐÓÃʲôÃüÁÒåij¸ö³ÌÐòÖ´ÐеÄÓÅÏȼ¶±ð
nice/renice£º½ø³ÌÖ´ÐÐÓÅÏȼ¶
¸ÅÄ
½ø³ÌÓÅÏȼ¶£ºÏµÍ³°´½ø³ÌÓÅÏȼ¶µÄ²»Í¬·ÖÅäCPUʱ¼ä£¬ÓÅÏȼ¶¸ßµÄ ......

Red Hat Enterprise Linux 4 in VMware learning tips

Red Hat Enterprise Linux 4, RHEL4
VMware® Workstation
7.0.0 build-203739
ÈçºÎÔö´óÐéÄâ»úµÄÓ²ÅÌÈÝÁ¿£ºÔÚÐéÄâ»úµÄÊôÐÔÀµã»÷"Add", ÔÚµ¯³ö¿òÖÐÑ¡Ôñ"Hard Disk"£¬È»ºóN¸öÏÂÒ»²½¼´¿É¡£
ÈçºÎÔÚHostºÍGuest VMÖ®¼äshareÎļþ£º
ÔÚVMÊôÐÔÀïµÄOptions tabÀѡÔñshare Folders£¬enable it, then ÉèÖÃÒ»¸öhostÅÌ·û»ò ......

ÐéÄâ»úÏÂLinuxÉÏÍøÅäÖà X

°²×°ÁËVMware
ÒÔºó£¬
XP
µÄÍøÂçÁ¬½ÓÀïÃæ¶àÁËÁ½¸öÍøÂçÊÊÅäÆ÷£¬·Ö±ðÊÇ
VMnet1
ºÍ
VMnet8
£¬ËüÃǵÄÏà¹ØÊôÐÔ¶¼ÊÇĬÈÏ×Ô¶¯ÅäÖõģ¬ÎÒÃÇ
²»ÓÃÀí²ÇÔÚ
Linux
ÏÂÉèÖÃ
ÉÏÍøµÄ²½Ö裺µÚÒ»²½£¬½«ËÞÖ÷ϵͳ£¨¼´
WinXP
£©ºÍ×Óϵͳ£¨¼´
Linux
£©µÄÁ½¸öÍø¿¨°ó¶¨ÊµÏÖ¹²Ïí¡£ÒÀ´ÎÊÇÍøÂçÁ¬½Ó
--->
±¾µØÁ¬½ÓÊôÐÔ
--->
Ñ¡Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ