Cloud Engineering/Linux ๐Ÿง

[Linux] ๋ฆฌ๋ˆ…์Šค ํ„ฐ๋ฏธ๋„ ๋ช…๋ น์–ด : ๋””๋ ‰ํ† ๋ฆฌ ํ™•์ธ

minjiwoo 2022. 12. 27. 19:02
728x90

1. ํ˜„์žฌ ์ž‘์—… ๋””๋ ‰ํ† ๋ฆฌ ํ™•์ธ

pwd 

2. ์‰˜ ์ถœ๋ ฅ๋œ ๋‚ด์šฉ ์ง€์šฐ๊ธฐ 

clear 

3-1. ๋””๋ ‰ํ† ๋ฆฌ ๋‚ด์šฉ ํ™•์ธ 

[root@localhost ~]# ls
aaaa  anaconda-ks.cfg  initial-setup-ks.cfg

3-2. ๋””๋ ‰ํ† ๋ฆฌ ๋‚ด์šฉ ์ž์„ธํžˆ ํ™•์ธํ•˜๊ธฐ 

[root@localhost ~]# ls -l
ํ•ฉ๊ณ„ 12
-rw-r--r--. 1 root root    4 12์›” 26 14:17 aaaa
-rw-------. 1 root root 1923 12์›” 26 11:17 anaconda-ks.cfg
-rw-r--r--. 1 root root 1971 12์›” 26 11:26 initial-setup-ks.cfg

์—ฌ๊ธฐ์„œ ๊ฐ ํ•„๋“œ์˜ ์˜๋ฏธ๋ฅผ ์•Œ์•„๋ณด์ž. 

d rwx r-x r-x 5 root root 5 Dec 27 18:55 dirA
ํŒŒ์ผ์†์„ฑ user
๊ถŒํ•œ
group
๊ถŒํ•œ
other
๊ถŒํ•œ
ํ•˜๋“œ๋งํฌ๊ฐœ์ˆ˜ ์†Œ์œ ์ž ๊ทธ๋ฃน ํฌ๊ธฐ(Byte) ๋งˆ์ง€๋ง‰ ์ˆ˜์ • ์‹œ๊ฐ„ ๋””๋ ‰ํ† ๋ฆฌ

'ํŒŒ์ผ ์†์„ฑ'์— ์˜ฌ ์ˆ˜ ์žˆ๋Š” ๊ธฐํ˜ธ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. 
d : ๋””๋ ‰ํ† ๋ฆฌ ํŒŒ์ผ 
D : ๋„์–ด ํŒŒ์ผ 
l : ์‹ฌ๋ณผ๋ฆญ ๋งํฌ ํŒŒ์ผ 
b : ๋ธ”๋ก ์žฅ์น˜ ํŒŒ์ผ 
c : ์บ๋ฆญํ„ฐ ์žฅ์น˜ ํŒŒ์ผ 
p : FIFO , Named Pipe ํŒŒ์ผ 
P: ์ด๋ฒคํŠธ ํฌํŠธ ํŒŒ์ผ 
s: ์†Œ์ผ“ ํ†ต์‹  
- : ์ผ๋ฐ˜ ํ…์ŠคํŠธ 

rwx๋Š” user, other, group ์— ๋Œ€ํ•œ ๊ถŒํ•œ์ด๋‹ค. r ์€read, w ์€ write, x ๋Š”excute ๋ฅผ ํ•  ์ˆ˜ ์žˆ๋Š” ๊ถŒํ•œ์ด๋‹ค. ํ•ด๋‹น ์œ„์น˜์— - ๊ฐ€ ์žˆ์œผ๋ฉด, ํ•ด๋‹น ๊ถŒํ•œ์ด ์—†๋‹ค๋Š” ์˜๋ฏธ์ด๋‹ค. 

3-3 ๋””๋ ‰ํ† ๋ฆฌ์˜ ์ˆจ๊ฒจ์ง„ ํŒŒ์ผ ํ™•์ธํ•˜๋Š” ์˜ต์…˜

ls - a

[root@localhost ~]# ls -a
.             .bash_profile  .config  .lesshst  aaaa
..            .bashrc        .cshrc   .ssh      anaconda-ks.cfg
.bash_logout  .cache         .dbus    .tcshrc   initial-setup-ks.cfg 

. ์ด ์•ž์— ๋ถ™์€ ํŒŒ์ผ๋“ค์€ ๊ธฐ๋ณธ์ ์œผ๋กœ hidden ์‹œํ‚จ๋‹ค. 

4. file ๋ช…๋ น์–ด 

ํŠน์ • ํŒŒ์ผ์ด ์–ด๋–ค ์ข…๋ฅ˜์˜ ํŒŒ์ผ์ธ์ง€ ์ถœ๋ ฅํ•œ๋‹ค. 

file [๋””๋ ‰ํ† ๋ฆฌ]

[root@localhost ~]# file /etc/passwd
/etc/passwd: ASCII text

 

728x90