ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • Pycham 터미널 간단 명령어
    [Python] 2024. 1. 16. 11:11
    • pwd ( print working directory ) : 현재 작업 중인 위치 출력 

    > pwd

    macOS : /Users/anyeongjin/PycharmProjects/HelloWorld

     

     

    • cd ( change directory ) : 디렉토리 변경

    > pwd 

    macOS : /Users/anyeongjin/PycharmProjects/HelloWorld

     

    > cd ..  # 한 단계 상위 디렉터리로 이동

    > pwd

    macOS : /Users/anyeongjin/PycharmProjects

     

    > cd HelloWorld  # 입력한 디렉터리 아래로 이동 

    > pwd

    macOS : /Users/anyeongjin/PycharmProjects/HelloWorld

     

     

    • cd ~ : 홈 디렉터리로 이동 (물결표 (~, tilde)도 같이 입력해야 한다.)

    /Users/{현재 로그인한 사용자명} 디렉터리로 이동한다.

     

    >pwd

    macOS : /Users/anyeongjin/PycharmProjects/HelloWorld

     

    > cd ~

    > pwd

    macOS : /Users/anyeongjin

     

     

    • ls -al ( list segments ) : 현재 위치의 모든 디렉터리 / 파일 출력
      • a 옵션 : .(dot) 으로 시작하는 이름을 포함
      • -l 옵션 : 긴 포멧으로 출력

    > ls -al 

    total 8
    drwxr-xr-x@ 5 anyeongjin  staff  160 Jan 15 19:09 .
    drwxr-xr-x@ 6 anyeongjin  staff  192 Jan 15 18:59 ..
    drwxr-xr-x@ 8 anyeongjin  staff  256 Jan 15 19:32 .idea
    -rw-r--r--@ 1 anyeongjin  staff   57 Jan 15 19:09 main.py
    drwxr-xr-x@ 6 anyeongjin  staff  192 Jan 15 18:59 venv

     

     

    • mkdir ( make directory ) : 디렉터리 생성

    > mkdir .temp

    > ls -al

    total 8
    drwxr-xr-x@ 6 anyeongjin  staff  192 Jan 15 19:40 .
    drwxr-xr-x@ 6 anyeongjin  staff  192 Jan 15 18:59 ..
    drwxr-xr-x@ 8 anyeongjin  staff  256 Jan 15 19:39 .idea
    drwxr-xr-x@ 2 anyeongjin  staff   64 Jan 15 19:40 .temp  # 생성된 디렉터리
    -rw-r--r--@ 1 anyeongjin  staff   57 Jan 15 19:09 main.py
    drwxr-xr-x@ 6 anyeongjin  staff  192 Jan 15 18:59 venv

Designed by Tistory.