linux築基之常用命令

2021-09-10 06:05:38 字數 907 閱讀 3600

1.

檢視歷史使用的命令history

2.切換目錄

cd ~桌面

cd ..

cd -

3.檢視檔案

cat小檔案

more

tail -f動態重新整理

搜尋檔案內容

cut -d: -f1 /etc/passwd 以:為間隔符 提取第1列

wc -l 行數

wc -c列數

wc -w單詞個數

find / -name fstab全盤搜尋檔名為fstab的檔案

find / -user ibeifeng

diff --brief a.txt b.txt

diff -c a.txt b.txt

touch -d "20:12" filename黑客

4.cp -r dirname

重定向

ls -l a.txt > res.txt只輸出正確資訊

ls -l a.txt >> res.txt只輸出正確資訊

ls -l wwwaaa > res.txt只輸出錯誤資訊

ls -l asd &> res.txt輸出所有資訊

管道符

1.統計目錄的檔案個數

ls -l /etc | wc -l

2.重置密碼

echo 123456 | passwd --stdin ibeifeng

echo 'uptime'

echo $(uptime)

自定義命令

alias mycommand1="...."

vi編輯器

末行模式

set nu

Linux常用命令之Linux常用命令實戰知識點

在在複習linux,這是以前做的筆記,分享一下。linux系統 一切皆檔案 操作檔案就是操作linux系統 一 linux版本 1 redhat 企業版 收費 2 centos redhat的社群版 免費 3 ubuntu 4 紅旗 二 linux的特點 1 多使用者 多工 2 豐富的網路功能 3 ...

linux之常用命令

1,命令語法結構 command options arguments command命令 如ll cd rm 等 options 可選項引數 如 help help等 arguments 目標物件,如檔案,資料夾,使用者名稱等 abc 表示裡面的引數abc是可選的 表示裡面的內容text是可變化的 ...

Linux常用命令之網路命令

write命令 wall命令 write all的縮寫 語法 wall message 功能 發廣播資訊 自己也能收到 例如 wall cly is a beauty!ping命令 語法 ping 選項 ip位址 c 指定傳送次數 ctrl c終止 功能 測試網路連通性 例如 ping 192.16...