상세 컨텐츠

본문 제목

[TIL 국비교육] 리눅스 우분투 명령어 보기 좋게 정리(시간날때 꼭 추가하자!)

[TIL] 오늘의 공부

by 개발소연자 2023. 5. 5. 18:28

본문

1. 파일에 대한 정보를 알고 싶을 때, 

Determine type of FILEs.

$file[option][file]

2. 현재 디렉터리에 있는 파일들을 보고 싶을 때,

List information about the file FILEs (the current directory by default).

Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.

-a: 숨긴 파일까지 보여줌.

-l: 파일의 세부 내용까지 보여줌.

-F: 파일의 종류를 알려줌.

ls 말고도 dir이라는 명령어도 있는데 같은 기능을 함.

$ls[option][file]
$dir
$vdir

3. 현재 디렉터리의 위치를 알고 싶을 때,

Print the name of the current working directory.

$pwd

4. 디렉터리를 이동하고 싶을 때,

Change the shell working directory.

$cd[dir]

5. 디렉터리를 새로 만들고 싶을 때,

Create the DIRECTORY(ies), if they do not already exist. 

-p: 하위 디렉터리에 새로운 디렉터리를 만들 수 있음.

$mkdir[option] DIRECTORY

6. 파일의 내용을 터미널에 출력하고 싶을 때,

Concatenates FILE(s) to standaard output

$cat[option][file]
$more[option][file]
$less[option][file]
$tail[option][file]

7. 파일을 복사하고 싶을 때,

Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.

$cp[option] SOURCE DEST
$cp[option] SOURCE DIRECTORY
$cp[option] DIRECTORY SOURCE

8. 파일을 옮기고 싶을 때,

 

9. 파일을 지우고 싶을 때,

 

10. 파이프로 파일 찾기

 

11. 파일 찾고 싶을 때,

관련글 더보기