CLI Shell command와 Vim editor2

모두의희망·2022년 12월 12일
0

Git, Github

목록 보기
2/4
post-thumbnail
ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev/public
$ mv ../main.js .
ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev/public
$ ls
app.js  index.html  main.js
  • 상위디렉토리에 있는 main.js를 지금 이디렉토리로 이동하라
ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev/public
$ cp index.html ./index-copy.html
ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev/public
$ ls
app.js  index-copy.html  index.html  main.js
  • index.html을 현재 이 디렉토리에 복사한다. 파일명은 copy를 붙였다 이유는 이름을 똑같이 하면 덮어 씌워지기 때문이다. index-copy.html이라는 것이 생김.
ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev/public
$ cp app.js ../app-copy.js

ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev/public
$ cd ..

ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev
$ ls
app-copy.js  example.txt  public/  server.py  style.css
  • 현재 public디렉토리에서 app.js를 복사하여 상위 디렉토리에 붙여넣는다. 파일명이 같을 수도 있고 다를수도 있다 여기서는 copy로 함
  • cd ..를 하여 상위로 올라가고 dev디렉토리에서 ls를하면 app-copy.js가 복사 된것을 알 수 있다.
ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev
$ cp public/app.js ./app-copy2.js

ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev
$ ls
app-copy.js  app-copy2.js  example.txt  public/  server.py  style.css
  • public의 app.js를 복사하여 app-copy2.js라는 이름을 정하고 현재 디렉토리인dev에 붙여넣기한다.
ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev
$ rm app-copy.js

ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev
$ ls
app-copy2.js  example.txt  public/  server.py  style.css
  • rm은 app-copy.js를 지운다.
ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev
$ rm -r public/
  • public디렉토리를 지운다.
ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev
$ vi learn-md.md

ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev
$ ls
app-copy2.js  learn-md.md  main.js  style.css

ghkst@DESKTOP-8SB8F5E MINGW64 ~/Documents/dev
$ cat learn-md.md
# Let's Learn Markdown
<h1>Let's Learn Markdown</h1>

This document is for learning markdown.
<p></p>

## vim modes

<ul>
  <li></li>
</ul>

- Normal mode: press 'esc' on any other mode.
- Insert mode: press 'i' on Normal mode.
- Visual mode: press 'v' on Normal mode.
- Command mode: press ':' on Normal mode.

<ol>
  <li></li>
</ol>

## My favorite Menu

1. Gookbob
2. Jookbal
3. Hamberger
4. Samgubsal
5. Icecream

```javascript
if (var i=1; i<10; i++) {
    console.log(i)
  }
* {
  padding: 0;
  margin: 0;
}

If you want to highlight specific word, use backquote.

$ touch hello.py

Go to google
https://www.google.com

![](https://www.google.com/favicon.ico)
profile
개발을 진정성 있게 다가가겠습니다.

0개의 댓글