etc/mac
terminal 명령어
aloha2jh
2021. 7. 6. 11:17
rm -rf
cd : change directory 폴더이동
ls : list segments 현재 경로 내 파일목록
pwd : print working directory 현재경로 출력
mkdir : make directory 디렉토리 생성
rmdir : remove directory 디렉토리 제거
cp : copy 파일/디렉토리 복사
mv : move 파일/디렉토리 이동
cat : concaternate 터미널에 파일내용 출력(js나 html을 열면 소스코드가 터미널에 출력)
touch : 파일 생성 및 날짜정보 변경
sudo : 관리자 권한으로 실행
cd ~ : 홈디렉토리로 이동
open 파일이름
curl
Client Uniform Resource Locater
cmd에서 url을 통해 직접 request를 할수있음
curl localhost:3000/health -v
curl -X POST localhost:3000/login -d 'email=test@test.com&password=123123'
원래 curl 명령어의 메서드기본값이 GET인데 X옵션을 통해 POST 로 설정했음
바디를 d옵션으로전달
code . :현재 디렉토리에서 vscode 실행시킴
vscode 에디터 ctrl+p 를 클릭해서 install code 입력해서 터미널에서 실행가능하도록 설치