RHCSA寒假第一次作業(yè)

作業(yè)要求:

image.png

history查詢全部命令如下:

[root@192 tmp]# history 
    6  cd /opt
    7  mkdir tmp
    8  ls
    9  cd /tmp
   10  touch a.txt
   11  ls
   15  cd tmp/
   17  cd /opt
   18  cd tmp/
   19  ls
   20  touch a.txt
   21  ls
   22  tree opt
   23  tree /opt
   24  vi newfile
   25  cd /boot/grub2/
   26  ls
   27  cat /boot/grub2/grub.cfg > /opt/tmp/newfile
   28  cat /opt/tmp/newfile
   29  cd /opt/tmp/
   30  ls
   31  vim newfile
   32  history 

完成詳細步驟

1:

創(chuàng)建安裝步驟省略

2文件管理命令:

[root@192 ~]# cd /opt
[root@192 opt]# mkdir tmp
[root@192 opt]# ls
tmp
[root@192 opt]# cd tmp/
[root@192 tmp]# touch a.txt
[root@192 tmp]# ls
a.txt
[root@192 tmp]# tree /opt
/opt
└── tmp
    └── a.txt

1 directory, 1 file

3vi/vim練習:

[root@192 tmp]# vi newfile

然后在文件中按i進入編輯輸入時間,輸入完畢后按esc,再按shfit+:,輸入wq,保存退出。

[root@192 tmp]# cd /boot/grub2/
[root@192 grub2]# ls
fonts  grub.cfg  grubenv
[root@192 grub2]# cat /boot/grub2/grub.cfg > /opt/tmp/newfile
[root@192 grub2]# cd /opt/tmp/
[root@192 tmp]# ls
a.txt  newfile
[root@192 tmp]# vim newfile

進入文件后在有#的字符的行列雙擊d鍵進行整行刪除,然后esc,shfit+:輸入set nu開啟vi行號提示功能,再輸入wq保存退出。

總結

第一次作業(yè)到這里就寫完了,總體比較的基礎,都是非常簡單的操作,重點還是對基礎命令的掌握。

?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

友情鏈接更多精彩內容