0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Linux ls -lコマンド実行時の属性情報の見方

Last updated at Posted at 2024-10-05

ls -lコマンド実行時の属性情報

ファイルの属性情報の見方を理解したとき「秘密の暗号を特別に理解できてしまった」みたいな、有能感というか謎の満足感みたいなものを感じたので共有します。

スクリーンショット 2024-10-05 204048.png

構成

下記のような構成で成り立っています。
1.ファイル種別
2.パーミッション
3.リンク数
4.所有ユーザー名
5.所有グループ名
6.サイズ
7.更新日
8.ファイル名

1.ファイル種別

①「-」ファイル名
②「l」シンボリック
③「d」ディレクトリ

2.パーミッション

①「r」read 読み込み可能
②「w」write 書き込み可能
③「x」excute 実行可能

ユーザーパーミッション | グループパーミッション | アザーパーミッッション
(ファイルの所有者 | 所有グループ | その他のユーザーに対する許可情報)
rw- r-- r--

パーミッションの表現方法は2種類あり、上記のように文字や記号を用いて表現する方法を「シンボリックモード」数値で表現する方法を「オクタルモード」といいます。

パーミッション 2進数 8進数
rwx 111 7
rw- 110 6
r-x 101 5
r-- 100 4
-wx 011 3
-w- 010 2
--x 001 1
--- 000 0

下記のような表記を目にすることがあると思いますが、これは最も制限が緩いパーミッションだということがわかります。
$ chmod 777 /tmp/test

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?