생활코딩 POSIX CLI 강의 요약
Git 다운로드 : https://git-scm.com/download/win
명령어 모음과 예제
- pwd :print working directory
- / : root directory
- ~ : Home directory
- cd : change directory
- .. : parent directory
- ./ : current direcory
- mkdir : make directory
- clear : clear console
- --help : simple manual for Window OS
ls --help
- man command : manual for Mac OS
man ls
- nano : text editor
- touch : make empty file
- .filename : hidden file
touch .hiddenfile.txt
- mv : move (rename)
# rename dummy to dummy2
mv dummy dummy2
- rm : remove file
- rm -r : remove directory / option r = recursive
- ../ parent directory (relative path)
- cat : print
cat filename.txt
- ls -l : list in long format
- ls -a : show all files
- ls -R : show inside directory
- ; : command seperator
mkdir dummy; cd dummy ; touch hello.txt ; cd ..; ls -R
.:
dummy/ hello.txt showfile.txt
./dummy:
hello.txt
- && : and operator
# If any of the &&-linked commands fails, the command does not run after command seperator(;)
# show parent directory file
mkdir dummy && cd dum && touch hello.txt && cd ..; ls -R
mkdir dummy && cd dum && touch hello.txt && cd ..; ls -R
mkdir: cannot create directory ‘dummy’: File exists
- package == program
- package manager ; apt-get, yum, homebrew, chocolatey
'CS > Git' 카테고리의 다른 글
[생활코딩] Git 명령어 (0) | 2020.01.24 |
---|
댓글