<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] ## 相對與絕對路徑 ~~~ . //當前目錄 .. //上級目錄 - //上一個工作目錄 ~ //家目錄(宿主目錄) ~~~ ~~~ [root@iZ28hf33mvpZ ~]# ls . #顯示當前目錄 [root@iZ28hf33mvpZ ~]# cd .. ~~~ ## 顯示目錄列表命令 ~~~ ls //顯示目錄內容 ls –a //包含隱藏文件 ls -l //列出文件詳細信息如屬性與權限信息 ls –lh //以容易識別的單位顯示如GB/MB/KB ~~~ ## 目錄命令 ### 切換目錄cd ~~~ cd ~www //進入www用戶宿主目錄 cd /tmp //進入根下tmp目錄 cd .. //進入上級目錄 cd ~ //返回當前用戶家目錄 ~~~ ### 顯示當前工作目錄 ~~~ pwd //顯示當前目錄路徑 ~~~ ### 創建目錄mkdir ~~~ mkdir xbs //在宿主目錄創建xbs目錄 mkdir –p /a/b/c //遞歸創建目錄 ~~~ ### 刪除空目錄rmdir ~~~ rmdir xbs //刪除空目錄xbs ~~~ ### 刪除目錄與文件rm ~~~ rm index.php //刪除文件index.php rm –r xbs //遞歸刪除目錄 rm –rf xbs //不用確認的刪除操作 ~~~ ### 復制目錄cp ~~~ cp index.php /tmp/index.php //復制文件index.php到tmp目錄 cp a1.txt a2.txt /tmp //a1.txt與a2.txt復制到/tmp目錄 cp index*.php /tmp //復制以index開始以.php結尾的文件到/tmp目錄 ~~~ ### 改名與移動 ~~~ mv xbsphp xbs //將xbsphp改名為xbs mv xbs /tmp //移動hdphp文件到/tmp中 ~~~ ### 讀文件內容 **顯示前幾行head** ~~~ head –n 2 /index.php //顯示前2行內容 ~~~ **取后幾行內容tail** ~~~ tail –n 5 index.php //顯示最后5行 ~~~ **一次顯示全部內容cat** ~~~ cat index.php //顯示文件內容 cat –n index.php //顯示文件內容帶行號 ~~~ **分屏顯示文件內容more** ~~~ more /etc/passwd q //退出 ~~~ ### 文本搜索grep Linux系統中grep命令是一種強大的文本搜索工具,它能使用正則表達式搜索文本,并把匹配的行打印出來 ~~~ grep 'xbs' index.php //顯示包含xbs的行 grep -v 'xbs' index.php //顯示包含xbs的行 ~~~ 1. -v 顯示不包含匹配文本的所有行 2. -n:顯示匹配行及 行號 3. -i:不區分大 ### 搜索查找whereis whereis命令只能用于程序名的搜索,而且只搜索二進制文件(參數-b)、man說明文件(參數-m)和源代碼文件(參數-s)。如果省略參數,則返回所有信息。 ~~~ whereis yum //搜索yum ~~~ ### 查找文件find ~~~ find / -name index.php //查找文件名為index.php的文件 find / -size +10000k //查找大于10Mb的文件 find /www -type d -exec chmod 750 {} \; //目錄設置為750 find /www ! -type d -exec chmod 640 {} \; //文件為640 find / -name *.php -exec rm -i {} \; //將查找到的文件刪除 ~~~ ## 軟鏈接 就像是快捷方式一樣,原文件刪除則軟鏈接就失效 為index.php文件創建軟鏈接index_link.php ~~~ ln –s /root/index.php /index_link.php ~~~ >[danger]創建鏈接必須指定絕對路徑 如果軟鏈接失效,終端會以不同的方式顯示,如不斷閃爍 ## 硬鏈接 在Linux的文件系統中,保存在磁盤分區中的文件不管是什么類型都給它分配一個編號,稱為索引節點號(Inode Index)。在Linux中,多個文件名指向同一索引節點是存在的。一般這種連接就是硬連接。硬連接的作用是允許一個文件擁有多個有效路徑名,這樣用戶就可以建立硬連接到重要文件,以防止“誤刪”。文件真正刪除的條件是與之相關的所有硬連接文件均被刪除。 **硬連接的2個限制:** 1. 不允許給目錄創建硬鏈接 2. 只有在同一文件系統中的文件之間才能創建鏈接。 即不同硬盤分區上的兩個文件之間不能夠建立硬鏈接 創建index.php硬鏈接到/index.bak.php ~~~ ln /root/index.php /hdxj.bak.php ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看