티스토리 뷰

Git

CLI (Command Line Interface)

summercat 2022. 1. 31. 16:32

POSIX (Portable Operating System Interface)

- UNIX 계열의 컴퓨터들을 제어하기 위한 표준

- unix, linux, macos는 posix를 따름

 

  File Directory
Create editor mkdir
Read editor, cat, ls ls
Update editor, mv mv
Delete rm rm

 

<명령어>

pwd : print working directory. 현재 작업중인 디렉토리

cd : change directory

cd / : root directory로 이동

cd ~ : home directory로 이동

ls : list directory contents. 디렉토리에 있는 파일/디렉토리의 목록을 보여줌

--help : simple manual ex) ls --help

man command : manual ex) man ls

ls -l : list in long format

touch : make empty file

ls -a : show all files (including hidden files)

mkdir: make directory

mv : move (rename). ex) mv dummy dummy2 : dummy라는 디렉토리의 이름을 dummy2로 변경

rm -r : remove directory.  ex) rm -r dummy : dummy라는 디렉토리를 삭제

rm : remove file

cd .. 또는 cd ../ : parent directory로 이동

cat file : file안의 내용을 보여줌

 

 

/ : root directory

~ : home directory

../ : parent directory

.filename : hidden file. 파일명 앞에 .을 붙이면 감춤(숨김)파일 처리 됨

./ : current directory ex) cd ./posix : current directory 아래 있는 posix directory로 이동    cd /posix : 최상위디렉토리 아래 있는 posix 디렉토리로 이동

; : command separator. 여러 명령어를 쓸 때 각 명령어를 구분해줌

&& : and operator. 

 

상대경로와 절대경로 (relative path vs absolute path)

absolute path : ex) cd /Users/jiyounglee/posix

relative path : ex) cd .. , cd ./posix

 

nano : terminal에서 사용 가능한 text editor의 한 종류

'Git' 카테고리의 다른 글

깃헙에 SSH key 등록해서 사용할 때 주의할점 (ssh-agent)  (1) 2023.01.18
GIT4 - Reset & Revert  (0) 2022.02.14
GIT3 - CLI branch & conflict  (0) 2022.02.07
GIT3 - CLI Backup  (0) 2022.01.31
Git2 - CLI 버전관리  (0) 2022.01.30
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
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 29 30 31
글 보관함