
今天我們來詳細講解下,Linux瀏覽文件的三種命令,它們分別是:cat、less、more!
cat命令: 一次性在終端中顯示文件的所有內容
cat Facebook首席運營官桑德伯格《Lean\ In》.txt
cat命令顯示出多少行呢?
參數:n 由 1 開始對所有輸出的行數進行編號
cat -n Facebook首席運營官桑德伯格《Lean\ In》.txt
cat命令還可以連接多個文本的內容一起輸出
cat -n hello.txt word.txt
less命令: 分頁顯示文件內容
less和cat最大的區別是:less命令會分一頁一頁地顯示文件內容,cat會一次性全部顯示
less Facebook首席運營官桑德伯格《Lean\ In》.txt
這時我們會看到 less命令不會一次性讀取 ‘Facebook首席運營官桑德伯格《Lean\ In》.txt’ 文本里的全部內容,而是會分頁讀取,每一頁讀取內容的多少是由你的終端大小來決定的
less命令瀏覽文件的快捷鍵:
注意:這里快捷鍵的字母都是區分大小寫的
less命令瀏覽文件高級快捷鍵的使用
“=”鍵:顯示當前頁面的內容是文件中第幾行到第幾行,按Enter鍵撤銷
Facebook首席運營官桑德伯格《Lean\ In》.txt lines 5-10/287 byte 4308/171635 3% (press RETURN)
下面我們就對這段描述信息座椅詳細的解釋:
Facebook首席運營官桑德伯格《Lean\ In》.txt: 表示當前正在讀取文件的名稱
lines 5-10/287: 表示這個文本總共有287行,當前正在讀取的是5-10行
byte 4308/171635: 表示文本總共有171635個字符,當前讀取了4308個字符
%3: 表示當前讀取的內容占了文本內容總共的 %3
h鍵:進入快捷鍵的幫助文檔,按q鍵退出
/(斜杠):進入搜索模式
如:搜索關鍵字 more
要想在搜索中跳轉到下一個符合的內容,可以按n鍵,按N鍵可以跳到上一個符合的內容
more命令
more命令和less命令相似,但沒有less命令強大
如:more命令不能往后翻頁,只能一路往前翻頁
這是因為more命令是在less命令之前出現的
注:這是Facebook首席運營官桑德伯格《Lean In》的部分篇章,大家可以用這部分篇章來對cat、less命令做一次動手實操的練習,這樣可以幫助大家更好的理解less命令的強大之處
I GOT PREGNANT with my first child in the summer of 2004. At the time, I was running the online sales and operations groups at Google. I had joined the company three and a half years earlier when it was an obscure start-up with a few hundred employees in a run-down office building. By my first trimester, Google had grown into a company of thousands and moved into a multibuilding campus.
My pregnancy was not easy. The typical morning sickness that often accompanies the first trimester affected me every day for nine long months. I gained almost seventy pounds, and my feet swelled two entire shoe sizes, turning into odd-shaped lumps I could see only when they were propped up on a coffee table. A particularly sensitive Google engineer announced that “Project Whale” was named after me.
One day, after a rough morning spent staring at the bottom of the toilet, I had to rush to make an important client meeting. Google was growing so quickly that parking was an ongoing problem, and the only spot I could find was quite far away. I sprinted across the parking lot, which in reality meant lumbering a bit more quickly than my absurdly slow pregnancy crawl. This only made my nausea worse, and I arrived at the meeting praying that a sales pitch was the only thing that would come out of my mouth. That night, I recounted these troubles to my husband, Dave. He pointed out that Yahoo, where he worked at the time, had designated parking for expectant mothers at the front of each building.
The next day, I marched in—or more like waddled in—to see Google founders Larry Page and Sergey Brin in their office, which was really just a large room with toys and gadgets strewn all over the floor. I found Sergey in a yoga position in the corner and announced that we needed pregnancy parking, preferably sooner rather than later. He looked up at me and agreed immediately, noting that he had never thought about it before.
To this day, I’m embarrassed that I didn’t realize that pregnant women needed reserved parking until I experienced my own aching feet. As one of Google’s most senior women, didn’t I have a special responsibility to think of this? But like Sergey, it had never occurred to me. The other pregnant women must have suffered in silence, not wanting to ask for special treatment. Or maybe they lacked the confidence or seniority to demand that the problem be fixed. Having one pregnant woman at the top—even one who looked like a whale—made the difference.
數據分析咨詢請掃描二維碼
若不方便掃碼,搜微信號:CDAshujufenxi
CDA數據分析師證書考試體系(更新于2025年05月22日)
2025-05-26解碼數據基因:從數字敏感度到邏輯思維 每當看到超市貨架上商品的排列變化,你是否會聯想到背后的銷售數據波動?三年前在零售行 ...
2025-05-23在本文中,我們將探討 AI 為何能夠加速數據分析、如何在每個步驟中實現數據分析自動化以及使用哪些工具。 數據分析中的AI是什么 ...
2025-05-20當數據遇見人生:我的第一個分析項目 記得三年前接手第一個數據分析項目時,我面對Excel里密密麻麻的銷售數據手足無措。那些跳動 ...
2025-05-20在數字化運營的時代,企業每天都在產生海量數據:用戶點擊行為、商品銷售記錄、廣告投放反饋…… 這些數據就像散落的拼圖,而相 ...
2025-05-19在當今數字化營銷時代,小紅書作為國內領先的社交電商平臺,其銷售數據蘊含著巨大的商業價值。通過對小紅書銷售數據的深入分析, ...
2025-05-16Excel作為最常用的數據分析工具,有沒有什么工具可以幫助我們快速地使用excel表格,只要輕松幾步甚至輸入幾項指令就能搞定呢? ...
2025-05-15數據,如同無形的燃料,驅動著現代社會的運轉。從全球互聯網用戶每天產生的2.5億TB數據,到制造業的傳感器、金融交易 ...
2025-05-15大數據是什么_數據分析師培訓 其實,現在的大數據指的并不僅僅是海量數據,更準確而言是對大數據分析的方法。傳統的數 ...
2025-05-14CDA持證人簡介: 萬木,CDA L1持證人,某電商中廠BI工程師 ,5年數據經驗1年BI內訓師,高級數據分析師,擁有豐富的行業經驗。 ...
2025-05-13CDA持證人簡介: 王明月 ,CDA 數據分析師二級持證人,2年數據產品工作經驗,管理學博士在讀。 學習入口:https://edu.cda.cn/g ...
2025-05-12CDA持證人簡介: 楊貞璽 ,CDA一級持證人,鄭州大學情報學碩士研究生,某上市公司數據分析師。 學習入口:https://edu.cda.cn/g ...
2025-05-09CDA持證人簡介 程靖 CDA會員大咖,暢銷書《小白學產品》作者,13年頂級互聯網公司產品經理相關經驗,曾在百度、美團、阿里等 ...
2025-05-07相信很多做數據分析的小伙伴,都接到過一些高階的數據分析需求,實現的過程需要用到一些數據獲取,數據清洗轉換,建模方法等,這 ...
2025-05-06以下的文章內容來源于劉靜老師的專欄,如果您想閱讀專欄《10大業務分析模型突破業務瓶頸》,點擊下方鏈接 https://edu.cda.cn/g ...
2025-04-30CDA持證人簡介: 邱立峰 CDA 數據分析師二級持證人,數字化轉型專家,數據治理專家,高級數據分析師,擁有豐富的行業經驗。 ...
2025-04-29CDA持證人簡介: 程靖 CDA會員大咖,暢銷書《小白學產品》作者,13年頂級互聯網公司產品經理相關經驗,曾在百度,美團,阿里等 ...
2025-04-28CDA持證人簡介: 居瑜 ,CDA一級持證人國企財務經理,13年財務管理運營經驗,在數據分析就業和實踐經驗方面有著豐富的積累和經 ...
2025-04-27數據分析在當今信息時代發揮著重要作用。單因素方差分析(One-Way ANOVA)是一種關鍵的統計方法,用于比較三個或更多獨立樣本組 ...
2025-04-25CDA持證人簡介: 居瑜 ,CDA一級持證人國企財務經理,13年財務管理運營經驗,在數據分析就業和實踐經驗方面有著豐富的積累和經 ...
2025-04-25