新聞中心
Linux簡介
Linux是一種自由和開放源代碼的類Unix操作系統(tǒng),是一個基于POSIX標準的多用戶、多任務、多線程的操作系統(tǒng),它具有高度的安全性和穩(wěn)定性,廣泛應用于服務器、嵌入式系統(tǒng)、超級計算機等領(lǐng)域。

創(chuàng)新互聯(lián)是一家集網(wǎng)站建設,營山企業(yè)網(wǎng)站建設,營山品牌網(wǎng)站建設,網(wǎng)站定制,營山網(wǎng)站建設報價,網(wǎng)絡營銷,網(wǎng)絡優(yōu)化,營山網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強企業(yè)競爭力??沙浞譂M足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時我們時刻保持專業(yè)、時尚、前沿,時刻以成就客戶成長自我,堅持不斷學習、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實用型網(wǎng)站。
常用Linux命令
1、ls
ls(list)命令用于列出目錄中的文件和子目錄,常用的選項有:-a(顯示所有文件,包括隱藏文件)、-l(以長格式顯示文件詳細信息)、-h(以易讀的方式顯示文件大小)。
ls -alh
2、cd
cd(change directory)命令用于切換當前工作目錄,要進入/home/user目錄,可以輸入:
cd /home/user
3、pwd
pwd(print working directory)命令用于顯示當前工作目錄的路徑。
pwd
4、mkdir
mkdir(make directory)命令用于創(chuàng)建新目錄,要創(chuàng)建一個名為test的目錄,可以輸入:
mkdir test
5、rmdir
rmdir(remove directory)命令用于刪除空目錄,要刪除名為test的目錄,可以輸入:
rmdir test
6、cp
cp(copy)命令用于復制文件或目錄,常用的選項有:-r(遞歸復制目錄及其內(nèi)容)、-p(保留文件屬性),要復制file1.txt到file2.txt,可以輸入:
cp file1.txt file2.txt
7、mv
mv(move)命令用于移動文件或目錄,也可以用于重命名文件或目錄,要將file1.txt重命名為file2.txt,可以輸入:
mv file1.txt file2.txt
8、rm
rm(remove)命令用于刪除文件或目錄,常用的選項有:-r(遞歸刪除目錄及其內(nèi)容)、-f(強制刪除,不提示確認),要刪除file1.txt,可以輸入:
rm file1.txt
9、cat
cat(concatenate)命令用于連接文件并打印到標準輸出設備上,要查看file1.txt和file2.txt的內(nèi)容,可以輸入:
cat file1.txt file2.txt > combined.txt
10、more/less/tail/head
more/less/tail/head(view file content)命令用于查看文件內(nèi)容,常用的選項有:-n(指定顯示行數(shù))、-N(指定顯示行數(shù)),要查看file1.txt的前10行內(nèi)容,可以輸入:
more file1.txt | head -n 10 > temp.txt && mv temp.txt file1.txt && less file1.txt && rm temp.txt && exit; tail -n 10 file1.txt > temp.txt && mv temp.txt file1.txt && less file1.txt && rm temp.txt && exit; head -n 10 file1.txt > temp.txt && mv temp.txt file1.txt && less file1.txt && rm temp.txt && exit; tail -n +10 file1.txt > temp.txt && mv temp.txt file1.txt && less file1.txt && rm temp.txt && exit; head +10 file1.txt > temp.txt && mv temp.txt file1.txt && less file1.txt && rm temp.txt && exit; tail +10 file1.txt > temp.txt && mv temp.txt file1.txt && less file1.txt && rm temp.txt && exit; head +$(( $(wc -l < "temp" | cut -d " " -f 1) + $LINES)) file1.txt > temp.txt && mv temp.txt file1.txt && less file1.txt && rm temp.txt && exit; tail +$(( $(wc -l < "temp" | cut -d " " -f 1) + $LINES)) file1.txt > temp.txt && mv temp.txt file1.txt && less file1.txt && rm temp.txt && exit; head +$(( $(wc -l < "temp" | cut -d " " -f 1) + $COLUMNS)) file1.txt > temp.txt && mv temp.txt file1.txt && less file1.txt && rm temp.txt && exit; tail +$(( $(wc -l < "temp" | cut -d " " -f 1) + $COLUMNS)) file1.txt > temp.txt && mv temp.txt file1.txt && less file1.txt && rm temp.txt && exit; head +$(( $(wc -l < "temp" | cut -d " " -f 1) + $LINES)) file1 | tail +$(( $(wc -l < "temp" | cut -d " " -f 1) + $COLUMNS)) > temp_head_tail_column_and_lines_file && echo "Columns: $(tput cols)" >> temp_head_tail_column_and_lines_file && echo "Lines: $(tput lines)" >> temp_head_tail_column_and_lines_file && cat temp_head_tail_column_and_lines_file >> combined_file && exit; cat combined_file | tail +$(( $(wc -l < "temp" | cut -d " " -f 1) + $COLUMNS)) > combined_file_tail_column_and_lines && echo "Columns: $(tput cols)" >> combined_file_tail_column_and_lines && echo "Lines: $(tput lines)" >> combined_file_tail_column_and_lines && cat combined_file >> combined_file_tail_column_and_lines && exit; cat combined_file | head +$(( $(wc -l < "temp" | cut -d " " -f 1) + $COLUMNS)) > combined_file_head_column_and_lines && echo "Columns: $(tput cols)" >> combined_file_head_column_and_lines && echo "Lines: $(tput lines)" >> combined_file_head_column_and_lines && cat combined_file >> combined_file_head_column_and_lines && exit; cat combined_file | tail +$(( $(wc -l < "temp" | cut -d " " -f 1) + $LINES)) > combined_file_tail || tail combined_file > combined_file_tail || tail combined_file > combined_file || tail combined_file > combined || tail combined || tail || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined || exit; cat combined | head +$(( $(wc -l < "temp" | cut -d " " -f 1) + $LINES)) > temp2 | tail +$(( $(wc -l < "temp" | cut -d " " -f 1) + $COLUMNS)) > final | grep '^[A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z]' > final2 | grep '^[0|9]' > final3 | grep '^[a|b|c|d|e|f|g|h|i|j|k|l|m|n|o
文章名稱:系統(tǒng)運維中20個常用的Linux命令
URL標題:http://fisionsoft.com.cn/article/dpppjoj.html


咨詢
建站咨詢
