中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

        EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 菜鳥教程:全面學(xué)習(xí) pwd 命令

        菜鳥教程:全面學(xué)習(xí) pwd 命令

        作者: 時(shí)間:2016-09-12 來(lái)源:網(wǎng)絡(luò) 收藏

        10.設(shè)置多行顯示 (就像下面這樣),

        /home123#Hello#!

        接著執(zhí)行(比如說ls)來(lái)檢驗(yàn)一切OK。

        avi@tecmint:~$ PS1='> $PWD$ 123#Hello#!$ ' /home123#Hello#!

        Set Multi Commandline Prompt

        設(shè)置多行顯示

        11.一下子檢查當(dāng)前工作路徑以及先前的工作路徑。

        avi@tecmint:~$ echo “$PWD $OLDPWD”/home /home/avi

        Check Present Previous Working Directory

        檢查當(dāng)前工作路徑

        12.文件的絕對(duì)路徑(以/開始)。

        /bin/

        13.源文件文件的絕對(duì)路徑(以/開始)。

        /usr/include/pwd.h

        13.pwd手冊(cè)的絕對(duì)路徑(以/開始)。

        /usr/share/man/man1/pwd.1.gz

        15.寫一個(gè)shell腳本分析home目錄下的一個(gè)目錄(比如tecmint)。如果當(dāng)前目錄是tecmint就輸出“Well! You are in tecmint directory”接著輸出“Good Bye”,不然就在tecmint下面創(chuàng)建一個(gè)目錄并提示你cd進(jìn)入它。

        讓我們首先創(chuàng)建一個(gè)‘tecmint’目錄,在下面創(chuàng)建一個(gè)名為‘pwd.sh’的腳本文件。

        avi@tecmint:~$ mkdir tecmintavi@tecmint:~$ cd tecmintavi@tecmint:~$ nano pwd.sh

        接下來(lái)在pwd.sh中加入下面的腳本。

        #!/bin/bash x=$(pwd)if [ $x == /home/$USER/tecmint ]then{echo Well you are in tecmint directoryecho Good Bye}else{mkdir /home/$USER/tecmintecho Created Directory tecmint you may now cd to it}fi

        給予執(zhí)行權(quán)限并運(yùn)行。

        avi@tecmint:~$ chmod 755 pwd.shavi@tecmint:~$ ./pwd.shWell you are in tecmint directoryGood Bye


        上一頁(yè) 1 2 下一頁(yè)

        關(guān)鍵詞: pwd 命令

        評(píng)論


        相關(guān)推薦

        技術(shù)專區(qū)

        關(guān)閉