美團測開一面準備 linux常用指令

2021-10-04 19:14:07 字數 1298 閱讀 4025

cd + 絕對路徑/相對路徑可以跳轉到先對應的資料夾下面

顯示當前的所在資料夾

了解指令情況和–help類似

關機等指令

ls -l 可以檢視檔案所有者

ls -alh看什麼整的

顯示當前資料夾下的檔案,可以通過ls *.txt正則表達類似的進行查詢

建立資料夾

建立檔案 touch love,建立love1到love10的txt檔案

sudo find 路徑 -name

sudo adduser limei

su -l limei(切換)

exit登出

groups lilei(看自己屬於哪個使用者組)

cat 讀取內容並列印出來 | sort根據乙個字典排序

cat /etc/group |grep -e 「shiyanlou」,過濾掉不需要的內容

sudo usermod -g sudo lilei

sudo deluser lilei --remove-home

sudo chown shiyanlou iphone11更改檔案擁有者

echo 「echo 「hello shiyanlou」」>iphone11向檔案中寫東西

sudo find /etc -name *.list查詢以list結尾的檔案

chmod 600只能自己讀寫

過…df 檢視磁碟容量

cat test.txt | sed 『s/hello/nihao』 > test1.txt

echo 「hello」 | tr -d 『olh』

echo 「hello」 | tr -d 『l』

echo 「hello」 | tr 『[a-z]』 『[a-z]』

cat /etc/log | col -x將tab轉化為空格方便觀察

paste -d 『:』 file1 file2 file3

paste -s 『:』 file1 file2 file3合併

過…sed,grep,awk

+號前面字元出現1-多次

?前面字元出現0-1次

*前面字元出現0-n次

grep -c 「shiyanlou」 test.txt有幾個

cat test.txt | grep 『hello』

sed -i 's/hello/nihao test.txt 在原本中替換

sed 's/hello/nihao test.txt >test2輸出到另外乙個裡面

sed 『2d』 passwd刪除第二行

vi test.txt

esc + :wq退出

美團一面二面

美團一面 1.介紹專案 2.說出自己優秀的地方 3.手撕 找出回文數 4.瀏覽器輸入乙個url 5.反問 美團外賣二面 49分鐘 1.介紹 2.專案介紹 3.白盒測試有哪些方法 4.黑盒測試有哪些方法。5.乙個軟體從開發到上線有什麼流程 6.現在有一段 搜尋一些檔案,在檔案找到關鍵字,最後函式返回關...

美團前端一面

你所知道的dom元素操作方法 獲取元素或者操作元素 盡可能多 你所知道的dom事件 冒泡捕獲 跨瀏覽器的事件模型 事件 position屬性介紹 display屬性介紹 bfc,實現方式 清除浮動 js繼承機制 陣列去重 二叉樹前序遍歷思路 vue宣告週期 vue mixin 和 2面問題 程式設計...

美團一面掛

美團一面面試題 1.寫出快速排序演算法 2.給定陣列和乙個固定的數值sum,輸出2個和為固定數值的數值對 就是說和為sum,每組數值對中包含的元素有2個 3.給定陣列和乙個固定的數值sum,輸出3個和為固定數值的數值對 就是說和為sum,每組數值對中包含的元素有3個 美團每次面試是1個小時,考演算法...