ÔÚ Linux ÖУ¬¹ÜµÀÁ¬½Ó×ÅÒ»¸öÃüÁîµÄ±ê×¼Êä³öºÍÁíÒ»¸öÃüÁîµÄ±ê×¼ÊäÈë¡£
ÈÃÎÒÃÇ¿¼ÂÇÒ»ÏÂÇ°ÃæËùÌÖÂÛµÄ ls ÃüÁî¡£ ls ÓÐÐí¶à¿ÉÓõÄÑ¡Ïµ«ÊÇÈç¹ûĿ¼µÄÄÚÈÝ¾í¶¯ËٶȿìµÃÄãÎÞ·¨²é¿´Ê±¸ÃÔõô°ìÄØ£¿
ʹÓÃÒÔÏÂÃüÁîÀ´²é¿´ /etc Ŀ¼µÄÄÚÈÝ£º
ls -al /etc
ÄãÔõôÑù²ÅÄÜÔÚÊä³ö¾í¹ýÆÁĻ֮ǰ×Ðϸ²é¿´ËüÃÇÄØ£¿
·½·¨Ö®Ò»ÊÇ°ÑÊä³öÓùܵÀµ¼Èëµ½Ò»¸ö½Ð×ö less µÄ¹¤¾ß¡£ less ÊÇÒ»¸ö·ÖÒ³¹¤¾ß£¬ËüÔÊÐíÄãÒ»Ò³Ò»Ò³£¨»òÒ»¸öÆÁĻһ¸öÆÁÄ»£©µØ²é¿´ÐÅÏ¢¡£
ʹÓÃÊúÏߣ¨ | £©À´°ÑÊä³öÓùܵÀµ¼Èëµ½ÃüÁîÖС£
ls -al /etc | less
ÏÖÔÚ£¬Äã¾Í¿ÉÒÔÒ»¸öÆÁĻһ¸öÆÁÄ»µØ²é¿´ /etc Ŀ¼µÄÄÚÈÝÁË¡£ÒªÏòÇ°Òƶ¯Ò»¸öÆÁÄ»£¬°´ [Space] ¼ü£»ÒªÏòºóÒƶ¯Ò»¸öÆÁÄ»£¬°´ [b] ¼ü£»ÒªÍ˳ö£¬°´ [q] ¼ü¡£Ê¹Óà less ÃüÁîʱ£¬Ä㻹¿ÉÒÔʹÓüýÍ·¼üÀ´Ç°ºóÒƶ¯¡£
ҪʹÓà less À´ËÑË÷Îı¾ÎļþµÄÊä³ö£¬°´ [/] £¬È»ºó¼üÈëÄãÏëÔÚÎļþÄÚËÑË÷µÄÄÚÈÝ¡£Æ©È磺
/Linux
ÇÏÃÅ:Òª¸ü×ÐϸµØÔĶÁÆô¶¯ÏûÏ¢£¬ÔÚ shell ÌáʾÏ£¬¼üÈë dmesg | less ¡£Ä㽫Äܹ»Ò»¸öÆÁĻһ¸öÆÁÄ»µØÔĶÁ¸ÃÎļþ¡£Ê¹ÓüýÍ·¼üÀ´Ç°ºó·ÔÄÎļþ¡£ÒªËÑË÷ÎļþÊä³ö£¬°´ [/] ²¢¼üÈëËÑË÷ÄÚÈÝ¡£
¹ÜµÀ»¹¿ÉÒÔÓÃÀ´Ö»´òÓ¡Ò»¸öÎļþÖеÄijЩÐС£¼üÈ룺
grep coffee sneakers.txt | lpr
Õ⽫»á´òÓ¡ sneakers.txt ÎļþÖÐÌáµ½¡°coffee¡±Õâ¸ö´ÊµÄÿһÐУ¨ÔÚµÚ 13.11.3 ½ÚÖпɶÁµ½¹ØÓÚ grep µÄÏêÇ飩¡£
13.10.1. more ÃüÁî
more ºÍ less µÄÖ÷ÒªÇø±ðÊÇ£¬ less ÔÊÐíÄãʹÓüýÍ·¼üÀ´Ç°ºóÒƶ¯£¬¶ø more ʹÓà [Spacebar] ºÍ [b] ¼üÀ´Ç°ºóÒƶ¯¡£
ʹÓà ls ºÍ more ÃüÁîÀ´Áо٠/etc Ŀ¼ÖеÄÄÚÈÝ¡£
¹ÜµÀºÍ·ÖÒ³Æ÷ls -al /etc | more
ͼ 13-10. °Ñ ls µÄÊä³ö¹ÜµÀÊä³ö¸ø more
ҪʹÓà more ÔÚÎı¾ÎļþÄÚËÑË÷¹Ø¼ü×Ö£¬°´ [/] ²¢¼üÈëËÑË÷ÌõÄ¿¡£Æ©È磺
/foo
ʹÓà [Spacebar] À´ÏòÇ°·ÔÄÒ³Âë¡£°´ [q] À´Í˳ö¡£