1 / 12

Data Structures

Data Structures. Week 2 : Unix 기초 / Make. 1. Make. Makefile 내부구성 Makefile 예제 Makefile 에서 매크로사용 Makefile 에서 레이블의 사용. 1.1 Makefile 내부구성. target, dependency, command target … : dependency … <TAB> command target command 가 수행되어서 나온 결과 파일을 지정 목적화일이나 실행화일이 위치 또는 레이블 기능을 제공

totie
Télécharger la présentation

Data Structures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Structures Week 2 : Unix 기초 / Make

  2. 1. Make • Makefile 내부구성 • Makefile 예제 • Makefile에서 매크로사용 • Makefile에서 레이블의 사용

  3. 1.1 Makefile 내부구성 • target, dependency, command • target… : dependency … <TAB> command • target • command가 수행되어서 나온 결과 파일을 지정 • 목적화일이나 실행화일이 위치 • 또는 레이블 기능을 제공 • command 부분에 정의된 명령들의 실행 • dependency 부분에 정의된 화일들이 내용이 변화 • target 부분에 해당하는 화일이 없을 때

  4. io.h main.c read.c write.c main.o read.o write.o test 1.2 Makefile 예제 (1)

  5. 1.2 Makefile 예제 (2) % gcc –c main.c % gcc –c read.c % gcc –c write.c % gcc –o test main.o read.o write.o

  6. 1.3 Makefile에서 매크로사용

  7. 1.4 Makefile에서 레이블의 사용

  8. 2. Unix 기초 • Basic • 로그인/로그아웃, 간단한 명령어 • 일상적인 사용 • 파일/파일 시스템 • Reference • Unix 프로그래밍 환경 • (역)이기철,표창우, 생능출판사

  9. 2.1 Basic 1: 접속

  10. 2.1 Basic 2: 간단한 명령어(1) % ls 현 디렉토리의 모든 파일 이름들을 열거하여라 % ls 파일명들 명시된 파일들 만을 열거하여라 % ls –t 시간 순서로 가장 최근 것부터 열거하라 % ls –l 길게 즉 더 많은 정보를 열거하라. ls –lt도 있음 % ls –u 최종사용시간을 기재 후 열거하라. ls –lu, ls -lut도 있음 % ls –r 역순으로 열거하라. –rt, -rlt등도 있음 % cp 파일1 파일2파일1을 파일2로 복사하라. 파일2가 존재하면 덮어써라 % mv 파일1 파일2파일1을 파일2로 이동하라. 파일2가 존재하면 덮어써라 % rm 파일명들 명시된 파일들을 제거하라 % grep 패턴 파일명들패턴에 부합되는 줄들을 프린트하라 % grep –v 패턴 파일명들패턴에 부합되지 않는 줄들을 프린트하라

  11. 2.1 Basic 2: 간단한 명령어(2)

  12. 2.2 파일/파일시스템 : 접근권한 * -rw-rw-r-- : 디렉토리(d)+파일소유자(rwx)+그룹의 권한(rwx )+모든 다른 사람(rwx) * r:4, w:2, x:1 % chmod 접근권한 파일명들

More Related