ºìÁªLinuxÃÅ»§
Linux°ïÖú

cat£ºÁгö¼°ºÏ²¢Îļþ

·¢²¼Ê±¼ä:2012-05-13 15:31:36À´Ô´:ºìÁª×÷Õß:empast
catÃüÁî: °ÑÎļþÄÚÈÝÔÚÆÁÄ»ÉÏÈ¥ÏÔʾ¡£

- -n ÔÚÔĶÁÎļþʱÏÔʾÐкÅ

# cat -n test.txt

cat ºÍÖض¨Ïò·û¡°>¡± : catÃüÁîͨ¹ýÊä³ö¡°Öض¨Ïò¡±°ÑÎļþÄÚÈÝË͵½ÆäËûµÄÎļþÖÐÈ¥¡£È磺

# cat test* > test3.txt
# cat test.txt test2.txt > test3.txt

catºÍÖض¨Ïò·û¡°>>¡± : ÎļþºÏ²¢

# cat test.txt >> test2.txt

cat > :¡¡´´½¨ÐÂÎļþ£¬ÊäÍêÎı¾ÄÚÈݺó°´ÏÂCtrl+D×éºÏ¼ü¹Ø±ÕÕâ¸öÎļþ¡£

# cat > myfile.txt
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 2 ÌõÆÀÂÛ

  1. jacklove48 ÓÚ 2012-08-11 12:23:09·¢±í:

    ²»ÖªµÀΪʲô£¬ÕâôÄêÇáµÄÎÒ £¬ÑÛ¾¦ÏÂÃæ×ÜÊÇÓм¸ÌõϸϸµÄÑÛÎÆ£¬Ð¦ÆðÀ´¾ÍºÜÃ÷ÏÔ£¬ÓÃÁ˺ܶàµÄÑÛ˪±ÈÈ磺Ã×Æ棬»¹ÓÐÅ·À³ÑÅ£¬¶¼²»¹ÜÓá£×î½ü£¬¸Õ½Ó´¥Ò»¸ö½ÐµÂÀö˹¿µÅÆ×ÓµÄÑÛĤ£¬ÍøÉϲéÁËһϣ¬Ð§¹û»¹²»´íÄØ¡£O(¡É_¡É)O~£¬ºÜÆÚ´ý×Ô¼º»áÓоªÏ²ÄØ¡£

  2. ËÕÎÄÁú ÓÚ 2012-07-26 14:14:56·¢±í:

    the ads was so good .be careful of your listening ability