linux查看檔案內容命令

來源:互聯網
上載者:User

linux查看檔案內容命令 cat   由第一行開始顯示檔案內容tac   從最後一行開始顯示nl    顯示同時輸出行號more  一頁一頁的顯示內容less  與more類似,但其優點是,可以往前翻頁head  只看頭幾行tail  只看未尾幾行od    以二進位的方式讀取檔案內容 cat [-n] -n連行號一起輸出到螢幕上 與nl相似 more [檔案名稱] more test.txt將test.txt一頁一頁的顯示出來ls -al | more將ls顯示的內容一頁頁顯示出來 less [檔案名稱] less的用法比more更有彈性,使用less可以用pageup、pagedown翻看  less test.txt /word  在test.txt中搜尋word這個字串  :q 退出less head [-n number] [檔案名稱] -n顯示number行head -n 20 test.txt  顯示test.txt前20行 tail [-n number] [檔案名稱] -n顯示number行tail -n 20 test.txt 顯示test.txt後20行 head -n 20 test.txt | tail -n 10 取11-20行hexdump 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.