#Linux

chmod

To change the permissions of a file or directory, we can use the chmod command (change mode).

To use chmod to alter permissions, we need to tell it:

  • Who we are changing permission for?
  • What change are we making? Adding? Removing?
  • Which permissions are we setting?

閱讀更多......

Unix or Unux-like system like mac or linux allow multiple users in a single machine.
As regular users, we don’t have permission to write or even read every file on the machine.
For example, if i try to read the file /etc/sudoers using cat . I get a “permission denied” message.

閱讀更多......

了解 Command 的輸入與輸出方式,如何傳遞 Command 的結果給下個 Command,可以讓你真正感受到 Shell 的強大,廢話不多說就馬上開始吧!

Command 的 Input 和 Output

給 Command輸入的資料可以是 Standard Input 或者是參數, Command 執行完的結果是 Standard Output 或是Standard Error,Standard Output 和 Error 預設的輸出位置是 Terminal

閱讀更多......

Linux 指令基本結構

Command 結構: command 名稱 + option + inputs, command 是有分大小寫的

命令是如何被執行的:$PATH 定義了可執行檔的位置,輸入命令後,會在有定義 $PATH 的文件夾中找尋執行檔,如果某個執行某個執行檔的名稱相同,會由最左邊的檔案夾被執行

image

which: 找到此命令的執行檔位置

image

command 可以接受多個參數: 找 2017 年 12 月的月曆

image

長、短 option: -v 是短 option, --version 是長 option, 但是不一定會有長 option

閱讀更多......

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×