日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

菜鸟学Linux 第007篇笔记 简单命令的使用讲解(文本、时间、目录)

發布時間:2025/3/19 linux 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 菜鸟学Linux 第007篇笔记 简单命令的使用讲解(文本、时间、目录) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Linux 發行版

Fedora, RedHat(CentOS), SUSU, Debian(Ubuntu, Mint), Gentoo, LFS(Linux From Scratch)


Command

目錄管理(先前節數已經講)

ls、cd、pwd、mkdir、rmdir、tree


文件管理(先前節數已經講)

touch、stat、file、rm、cp、nano、mv


日期時間(先前節數已經講)

date、clock、hwclock、cal


查看文本

cat、tac、more、less、head、tail

文本處理

cut、join(用得不多)、sed、awk

文本排序

sort、uniq

文本統計

wc

字符處理

tr


detail of Command

查看文本

cat concatenate(V.連接) files and print on the standard output

-n number all output lines

-A --show-all

-E display $ at end of each line 行結束符

tac concatenate and print files in reverse(反轉)

more? file perusal filter for crt viewing(和less區別到end會退出而less不會)

less opposite of more

head? output the first part of files

tail output the last part of files

-f ? output appended data as the file grows; -f, --follow, and --fol-

??low=descriptor are equivalent 查看文件尾部,等待顯示后續追加內容

head/tail -n output the first/last N lines

文本處理

cut? remove sections from each line of files

-d? use DELIM instead of TAB for field delimiter(定界符)

-f? select only these fields;

文本排序

sort? sort lines of text files

-n? compare according to string numerical value

-r? reverse the result of comparisons(比較)

-t? use SEP instead of non-blank to blank transition(字段分隔符)

-k start a key at POS1, end it at POS2 (origin 1)(從哪里開始排序)

-u 去除重復 with ?-c, ?check ?for ?strict ordering; without -c, output

??only the first of an equal run

-f fold lower case to upper case characters(折疊大小寫 按字翻譯哈哈)

uniq report or omit repeated lines(顯示相鄰重復的行)

-d only print duplicate(重復) lines

-c prefix(前綴) lines by the number of occurrences 顯示重復行次數

文本統計

wc print the number of newlines, words, and bytes in files

-c print the byte counts

-l print the newline counts

-w print the word counts

-L print the length of the longest line



字符處理

tr translate or delete characters

用法示例: tr 'a-z' 'A-z' < /etc/passwd ? 將此文件里的小字轉換為大寫 <此符號以后會講

-d delete characters in SET1, do not translate


Ctrl+c 中斷當前程序

Shift+Page up/down 在終端里翻頁(有限會有一部分被刪除)

本文轉自Winthcloud博客51CTO博客,原文鏈接http://blog.51cto.com/winthcloud/1856977如需轉載請自行聯系原作者


Winthcloud

總結

以上是生活随笔為你收集整理的菜鸟学Linux 第007篇笔记 简单命令的使用讲解(文本、时间、目录)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。