以二進位制和八進位制方式表示檔案模式

2022-06-15 05:57:12 字數 3036 閱讀 4531

r w x 2^3=9

檔案型別dl

cb所有者、組、其他使用者

1+3^3=10

u g o 

a=all

c 字元裝置檔案 ,該檔案型別表示以位元組流形式處理資料的裝置,入終端或數據機

b 塊裝置檔案,該檔案型別表示以資料塊方式處理資料的裝置,入硬碟驅動或者光碟驅動

0=000

1=001

2=010

3=011

4=100

5=101

6=110

7=111

chmod 600 ~/foo.txt  設定檔案所有者具有讀寫許可權,而取消其他所有使用者的所有許可權

rwx讀寫執行

chmod u=rw,go=---  ~/foo.txt

u+x 為所有者新增可執行許可權

u-x                刪除

+x      所有者、所有者所屬群組、其他所有使用者新增可執行許可權     a+x

o-rw

go=rw

8進製中1個數字代表2進製中的3個數字,16-4

動手[root@hadoop2 apiserver]# ll -as

total 60

4 d-wx--x--x 2 root root 4096 dec 8 14:24 .

4 drwxr-xr-x 9 root root 4096 dec 7 20:07 ..

12 -rwxr-xr-x 1 root root 10305 dec 8 17:54 chk_this_uid_url.py

8 -rwxr-xr-x 1 root root 6557 dec 8 15:06 chk_this_uid_url_run_cmd.py

12 -rwxr-xr-x 1 root root 10846 dec 8 15:48 chk_this_uid_url_send_cmd.py

4 -rwxr-xr-x 1 root root 2784 dec 8 14:52 chk_this_uid_url_send_cmd.py.log

0 -rwxr-xr-x 1 root root 0 dec 7 20:02 __init__.py

4 -rwxr-xr-x 1 root root 145 dec 8 15:20 tcmd.py

4 -rwxr-xr-x 1 root root 2742 dec 8 14:42 tcmd.py.log

4 -rwxr-xr-x 1 root root 1044 dec 8 13:47 t.py

4 -rwxr-xr-x 1 root root 2212 dec 5 15:39 ua_list.txt

[root@hadoop2 apiserver]# chmod a-x *

[root@hadoop2 apiserver]# ll -as

total 60

4 d-wx--x--x 2 root root 4096 dec 8 14:24 .

4 drwxr-xr-x 9 root root 4096 dec 7 20:07 ..

12 -rw-r--r-- 1 root root 10305 dec 8 17:54 chk_this_uid_url.py

8 -rw-r--r-- 1 root root 6557 dec 8 15:06 chk_this_uid_url_run_cmd.py

12 -rw-r--r-- 1 root root 10846 dec 8 15:48 chk_this_uid_url_send_cmd.py

4 -rw-r--r-- 1 root root 2784 dec 8 14:52 chk_this_uid_url_send_cmd.py.log

0 -rw-r--r-- 1 root root 0 dec 7 20:02 __init__.py

4 -rw-r--r-- 1 root root 145 dec 8 15:20 tcmd.py

4 -rw-r--r-- 1 root root 2742 dec 8 14:42 tcmd.py.log

4 -rw-r--r-- 1 root root 1044 dec 8 13:47 t.py

4 -rw-r--r-- 1 root root 2212 dec 5 15:39 ua_list.txt

[root@hadoop2 apiserver]# chmod a+x *

[root@hadoop2 apiserver]# ll -as

total 60

4 d-wx--x--x 2 root root 4096 dec 8 14:24 .

4 drwxr-xr-x 9 root root 4096 dec 7 20:07 ..

12 -rwxr-xr-x 1 root root 10305 dec 8 17:54 chk_this_uid_url.py

8 -rwxr-xr-x 1 root root 6557 dec 8 15:06 chk_this_uid_url_run_cmd.py

12 -rwxr-xr-x 1 root root 10846 dec 8 15:48 chk_this_uid_url_send_cmd.py

4 -rwxr-xr-x 1 root root 2784 dec 8 14:52 chk_this_uid_url_send_cmd.py.log

0 -rwxr-xr-x 1 root root 0 dec 7 20:02 __init__.py

4 -rwxr-xr-x 1 root root 145 dec 8 15:20 tcmd.py

4 -rwxr-xr-x 1 root root 2742 dec 8 14:42 tcmd.py.log

4 -rwxr-xr-x 1 root root 1044 dec 8 13:47 t.py

4 -rwxr-xr-x 1 root root 2212 dec 5 15:39 ua_list.txt

[root@hadoop2 apiserver]#

八進位制轉二進位制

位 bit 一位二進位制數,又稱位元 位元組 byte 1b 8b 記憶體儲存的最小單元 字長 同一時間內,計算機能處理的二進位制位數 字長決定了計算機的運算精度,字長越長,計算機的運算精度就越高。因此,高效能的計算機,其字長較長,而效能較差的計算機,其字長相對要短一些。其次,字長決定了指令直接定址...

二進位制 八進位制和十六進製制

我們平時使用的數字都是由 0 9 共十個數字組成的,例如 1 9 10 297 952 等,乙個數字最多能表示九,如果要表示 十 十一 二十 九 一百等,就需要多個數字組合起來。例如表示 5 8 的結果,乙個數字不夠,只能 進製 用 13 來表示 這時 進一位 相當於十,進兩位 相當於二十。因為逢十...

二進位制 八進位制和十六進製制

進製也就是進製。進行加法運算時逢 x進一 滿 x進一 進行減法運算時藉一當 x,這就是 x進製,這種進製也就包含 x個數字,基數為 x。十進位制有 0 9共 10個數字,基數為 10,在加減法運算中,逢十進一,借一當十。我們不妨將思維拓展一下,既然可以用 0 9共十個數字來表示數值,那麼也可以用0 ...