Linuxstart - L1 L2 Common commands

https://github.com/mengning/linuxstart

L2 Usage

Common Commands

  • PATH environment variables and hot keys
echo $PATH 
export PATH=$PATH:/home/ubuntu/
~/.bashrc
whereis check command position
  • User and user group:useradd groupadd
    Root User
    General User
    Virtual User
  • file attribute and permission to operate:chmod, chown
-rwxr-xr-x 1 ubuntu ubuntu 430540 Dec 23 18:27 example.file
file user->group user->other user
chmod 777 filename
  • find grep
search for files: find . -name 2020*
search for text: ls -l | grep -rn '^a'|grep -v x|grep -w
  • tar
tar –cvf jpg.tar *.jpg //The package directory for all jpg files into tar.jpg
tar –xvf file.tar //Extract the tar package
  • ssh sshd
#ssh to log in to your Linux system, through the find command to find the / etc directory destination time and by all * .conf
#tar package; * .conf by grep the files contained in the file "ubuntu" , then redirect it into a new file
tar -cvf conf.tar /etc/*.conf |grep "ubuntu" > ./unbuntu_conf
  • cut
 cut -d : -f 1,7 /etc/passwd
who | cut -c 1-16,26-38
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • mean to add the formatted="false" attribute?.[ 46% 47325/...
    ProZoom閱讀 3,224評(píng)論 0 3
  • Overview The File System (FS) shell includes various shel...
    EasyNetCN閱讀 521評(píng)論 0 2
  • 一、Nagios簡(jiǎn)介 Nagios是一款開(kāi)源的電腦系統(tǒng)和網(wǎng)絡(luò)監(jiān)視工具,能有效監(jiān)控Windows、Linux和Uni...
    1b3bd36d9d21閱讀 8,407評(píng)論 3 13
  • 初七同學(xué)聚會(huì)收支簡(jiǎn)報(bào) 本著溝通交流、團(tuán)結(jié)友愛(ài)同學(xué)的宗旨和開(kāi)心辦會(huì)、精彩辦會(huì)、節(jié)儉辦會(huì)的原則,...
    華閩南博虎閱讀 1,142評(píng)論 0 0
  • 今天七月的最后一天,本來(lái)不想寫(xiě)的,覺(jué)得沒(méi)什么可寫(xiě)的,想想還是寫(xiě)了, 最近天氣一直都很燥熱,一顆心也跟著燥熱難耐,想...
    抗拒4343閱讀 389評(píng)論 1 1

友情鏈接更多精彩內(nèi)容