1. - : regular file
  2. d : directory
  3. c : character device file
  4. b : block device file
  5. s : local socket file
  6. p : named pipe
  7. l : symbolic link

Character device

Character and block device files allow users and programs to communicate with hardware peripheral devices.

For example:

$ ls -ld /dev/vmmon 
crw------- 1 root root 10, 165 Jan 4 10:13 /dev/vmmon

In this case the character device is the vmware module device.

Block Device

Block devices are similar to character devices. They mostly govern hardware as hard drives, memory, etc.

$ ls -ld /dev/sda
brw-rw---- 1 root disk 8, 0 Jan 4 10:12 /dev/sda

 

ref. https://linuxconfig.org/identifying-file-types-in-linux

 

Identifying File types in Linux - LinuxConfig.org

Details Lubos Rendek System Administration 09 June 2016 Introduction When navigating the Linux file system you are sure to encounter different file types. The most used and obvious file types are regular files and directories. However, the Linux operating

linuxconfig.org

 

character device file 의 사용

https://temp123.tistory.com/16

'20. Programming > Tools - 4Linux' 카테고리의 다른 글

[Linux] 이전 dir로 이동하기 (Going to previous dir)  (0) 2018.04.06
[Linux] Permission 표현  (0) 2018.03.15
[Linux] SSH - Screen  (0) 2018.01.03

Ref : https://unix.stackexchange.com/questions/81224/how-to-go-to-the-previous-working-directory-in-terminal


간단한 방법


$ cd   -


OR


$ cd   $OLDPWD


위 명령이 먹히지 않을 때는 아래 명령을 입력하여

$ cd - 를 동작하도록 한다.


$ cd   -; pwd




Stack을 이용하는 방법

$ cd  - 는 바로 전 dir로만 이동된다. stack를 이용하면 Dir 이동 History를 관리할 수 있다. (하지만 낫설다)



$ pushd                        => 현재 stack 출력


$ pushd   dirName       => push current dir and go to dirName 


$ popd                         => pop dir and change dir



EX>


[/]                           $ pushd ~/aaa      => push root dir & go to aaa dir


[/home/aaa]           $ pushd ~/bbb      => push aaa dir & go to bbb dir


[/home/aaa/bbb]    $ popd              => pop aaa dir & go to aaa dir


[/home/aaa/]          $ popd              => pop root dir & go to root dir


'20. Programming > Tools - 4Linux' 카테고리의 다른 글

[Linux] Linux File types  (0) 2019.09.25
[Linux] Permission 표현  (0) 2018.03.15
[Linux] SSH - Screen  (0) 2018.01.03


파일이나 디렉토리의 권한을 보통 숫자로 표현하는데 
각 문자는 2^n 으로 표현하며 r은 2^2, w는 2^1, x는 2^0, - 는 0으로 표현한다.

1
drwxr-xr-x 3 root root 4096 Oct 29 2016 src




drwxr-xr-x 를 숫자로 표현하면 아래와 같다.

 

 소유자

 그룹 사용자

그외 사용자 

 r

 w

 x

 r

 -

 x

 r

 -

 x

 

 2^2

 2^1

2^0

2^2

2^1

2^0

2^2

2^1

2^0 

 

4

2

1

4

0

1

4

0

1








 

 의미

 Remark

 d

 directory

 

 l(엘)

 Symbol link

 

 -

 File

 




'20. Programming > Tools - 4Linux' 카테고리의 다른 글

[Linux] Linux File types  (0) 2019.09.25
[Linux] 이전 dir로 이동하기 (Going to previous dir)  (0) 2018.04.06
[Linux] SSH - Screen  (0) 2018.01.03

 

http://dreamlog.tistory.com/470

 

1.     Ssh 접속

A.     Session 생성

                         i.         $ screen -S build1  (session )

B.      Session window 만들기

                         i.         Ctrl + a, c

2.     Ssh 종료

3.     Ssh 재접속

A.     $ screen -x build1 (session name)

'20. Programming > Tools - 4Linux' 카테고리의 다른 글

[Linux] Linux File types  (0) 2019.09.25
[Linux] 이전 dir로 이동하기 (Going to previous dir)  (0) 2018.04.06
[Linux] Permission 표현  (0) 2018.03.15

+ Recent posts