1 / 22

20130319

20130319. http://Ihsumlee.bounceme.net. 啟動 步驟 : • 打開 virtualbox -> 啟動 Fedora-> 啟動伺服器網路 • 查詢電腦 ip : 命令 提示字元 -> ipconfig (windows) • 利用 pietty 以 root 登入伺服器. /. cd. cd var. root. etc. home. bin. var. sbin. cd www. cd. mail. web. sysconfig. dog. www. html. dir1. dir2.

Télécharger la présentation

20130319

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 20130319 http://Ihsumlee.bounceme.net

  2. 啟動步驟: •打開virtualbox->啟動Fedora->啟動伺服器網路 •查詢電腦ip: 命令提示字元-> ipconfig (windows) •利用pietty以root登入伺服器

  3. / cd .. cd var root etc home bin var sbin cd www cd .. mail web sysconfig dog www html dir1 dir2 network-scripts cd目錄: 切換目錄 cd .. :回到上層目錄 ls 查看目前目錄的檔案 su 切換使用者 2010 2009 dog 角色 2:root 角色1:Lee dog lit file3

  4. 相對路徑與絶對路徑 / root etc home bin dev var www mail web mail tiger lee file1 2010 admin lee html mail web 2010 myhome file1 file1 角色:root 目前路徑:\ [root@leedev]#cd ../../../home/Lee/web/myhome [root@lee html]#cd /home/Lee/web

  5. pwd顯示目前所在的資料夾位置 • ls -al 查看資料夾中全部的檔案, 包括隱藏檔 • touch 檔案名稱 : 新增檔案 • mkdir資料夾名稱:新增資料夾名稱 • rm檔案名稱: 刪除檔案 • rmdir資料夾名稱: 刪除資料夾 • rmdir通常會以rm -rf來取代

  6. 目前的使用是lee, 所在位置是lee的家目錄 練習 • 我要新增一個資料夾叫 “ zoo” • 在資料夾zoo中, 新增三個檔案dog, cat, and tiger 指令 • touch 檔案名稱 : 新增檔案 • mkdir資料夾名稱: 新增資料夾名稱 結果 • /home/lee/zoo • 在zoo資料夾下輸入ls, 會看到dog, cat , tiger Tainan Taipei New Taipei zoo

  7. r

  8. / home root var etc lee lee zoo zoo Taipei dog dog tiger tiger cat cat

  9. / root var etc home lee Tainan Taipei New Taipei zoo zoo zoo dog dog dog tiger tiger tiger cat cat cat

  10. 把tiger複製一份為, tiger_daugter • 把cat變更檔名為small_cat cp:複製資料夾或檔案 mv: 移動資料夾或檔案

  11. touch, mkdir, rm, rmdir, ls –al, cd • Step1:請到資料夾dir3裡面,新增三個檔案f1,f2,f3. • Step2:試著刪除dir3

  12. 複製及移動資料 • cp:複製資料夾或檔案 • mv: 移動資料夾或檔案 Example cp (-r) 來源檔案 目的檔案 mv 來源檔案 目的檔案

  13. / 絶對路徑:路徑位置是從 根目錄開始算 home file1 lee dir1 dir2 lee file1

  14. / 相對路徑:路徑位置是從你所在地方開始 home 在dir1新增一個檔案, file2, 然後將file2 複製到dir2裡面, 使用相對路徑 lee file1 lee dir1 file2 dir2 file1

  15. http://ihsumlee.bounceme.net • 在資料夾testdir下,新增三個檔案f1,f2,f3 / root etc home bin var sbin mail web sysconfig tiger www html testdir network-script

  16. su, useradd, passwd, mv, cp,ls –al, cd,rm –rf, mkdir, touch http://ihsumlee.bounceme.net • 在tiger的家目錄下建立二個目錄dir1和dir2 • 在dir1下新增3個檔案file1、file2和file3 • 將dir1移動至dir2, 並將dir1 更改資料夾名稱為dir3 • 進入至dir3 • 將dir3下的file3更改名稱為file_bk3 • 將file_bk3移動至你的家目錄 • 如果沒有tiger使用者,麻煩自行新增. • Ip: 192.168.1.2 • username/passwd: tiger/123456,cat/123456,dog/123456, bird/123456 • 完成上述動作, 並以你的學號新增一個檔案, 如“B21017079”在你的家目錄.

  17. mkdir dir1 dir2 cd dir1 touch file1 file2 file3 / root etc home bin var sbin tiger tiger dir1 dir2 file1 file2 file3

  18. cd .. mv dir1 dir2/dir3 / root etc home bin var sbin tiger tiger dir2 dir1 file1 file2 file3

  19. cd dir2/dir1 / root etc home bin var sbin tiger dir2 tiger dir1 file1 file2 file3

  20. mv file3 file3_bk / root etc home bin var sbin tiger dir2 tiger dir1 file1 file2 File3_bk

  21. mv file3_bk ~ / root etc home bin var sbin tiger File3_bk dir2 tiger dir1 file1 file2

More Related