티스토리 뷰
access type
Owner, Group, Other
-rwxrwx--- 1 user11 class 141 Nov 13 1993 prog1
-rw-rw---- 1 user11 class 29 Nov 13 1993 yourfile
/ow//gr//ot/ owner group ... and other
Files
Read : Contents can be examined [cat filename]
Write : Contents can be changed [vi filename]
Execute : File can be used as a command
{ eg)
$ cat myprog
# this is the program myprog
date
ls -F
$ myprog
Tue Jun 20 12:51:41 KST 2017
README.exrc color5* grape memo.bak/ mytrap2* prog2*
abcdefXlmnop color6* herfile mod1.c names remind
abcdefYlmnop f1 infinite* mod2.c names.cp root_file
}
Directory
Read : Contents can be examined [ ls /root, /root unreadable (for general user)]
Write : Contents can be changed [ mkdir /root/"filename", /root: Permission denied. rm /root/"filename", /root: Permission denied. mv /root/"filename" ... ]
Execute : Can become current working directory [ cd /root, /root : Permission denied ]
chomod (u,g,o,a)(+,-,=)(w,r,x) or (octal) "filename"
{
$ ll peach
-rw-rw---- 1 user11 class 16 Nov 13 1993 peach
$ chmod u+x,g-w,o=r peach
$ ll peach
-rwxr--r-- 1 user11 class 16 Nov 13 1993 peach
umask : inform initial permission condition [umask "octal number", subtract "octal number" from initial permission condition(set initial permission condition)]
{
$ umask
02
$ mkdir adir
$ touch afile
$ ls -ld adir
drwxrwxr-x 2 user11 class 96 Jun 20 13:04 adir
[directory permission condition 777(All Unix) subtract umask 02 = 775, rwxrwxr-x]
$ ll afile
-rw-rw-r-- 1 user11 class 0 Jun 20 13:05 afile
$ umask 022
$ umask
022
touch : create a new, empty file or modification times of file
{
$ touch yohanfile
$ ls -l yohanfile
-rw-rw-r-- 1 user11 class 0 Jun 20 14:29 yohanfile
$ ll lime
-rw-rw---- 1 user11 class 15 Nov 13 1993 lime
$ touch lime
$ ll lime
-rw-rw---- 1 user11 class 15 Jun 20 14:29 lime
chown "username" "filename" : change owner of file [ chown "username":"groupname" "filename" change owner and group of file]
chgrp "groupname" "filename" : change group of file
su "id" : switch User id [su root, su - "username", 로그인할 때 상대 Home directory의 .profile 참조]
newgrp : changes the group ID
{
$ id
uid=311(user11) gid=301(class) groups=302(class2)
$ newgrp class2
$ id
uid=311(user11) gid=302(class2) groups=301(class)
$ newgrp class
$ id
uid=311(user11) gid=301(class) groups=302(class2)
$ touch testfile
$ ll testfile
-rw-rw-r-- 1 user11 class 0 Jun 20 14:48 testfile
$ newgrp class2
$ touch dfile
$ ll dfile
-rw-rw-r-- 1 user11 class2 0 Jun 20 14:49 dfile
review (modification)
-rw-rw---- 1 user11 class 3081 Jun 20 15:19 funfile
'IoT 과정' 카테고리의 다른 글
HPUX - File Name Generation (0) | 2017.06.21 |
---|---|
HPUX - Shell Advanced Features (0) | 2017.06.21 |
HPUX - Shell Basic (0) | 2017.06.21 |
HPUX - vi (0) | 2017.06.20 |
HPUX - Navigating the File System, Managing Files (0) | 2017.06.19 |
- Total
- Today
- Yesterday
- 최단경로 알고리즘
- beginning javascript
- 아레나 시뮬레이션
- 자바스크립트
- grafana cloud
- arena simulation
- 자바스크립트 예제
- 가상 면접 사례로 배우는 대규모 시스템 설계 기초
- Propositional and Predicate Logic
- 그라파나
- Arena
- 이산 수학
- Grafana
- flutter
- 시뮬레이션
- 아레나시뮬레이션
- 이산수학
- 백준
- javascript
- 명제논리
- 엄청난 인내심과 시뮬레이션을 위한 아레나 툴
- 아레나
- 로젠
- paul wilton
- Discrete Mathematics
- Simulation
- 대규모 시스템 설계 기초
- 항해99
- rosen
- 데이터 중심 애플리케이션 설계
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |