[공학기술]유닉스 명령어 만들기 (ls, rm, cp, mv)
- 최초 등록일
- 2007.05.12
- 최종 저작일
- 2007.01
- 18페이지/ 한컴오피스
- 가격 1,000원
소개글
유닉스 명령어(ls, rm, cp, mv)구현입니다.
----------------------------------------------
* 다음과 같은 Utility를 제작한다.
- myls, myrm, mycp, mymv
- 기본적인 구현 뿐 아니라 여러 가지 옵션을 추가한다.
(ls -laRF, rm -ivRf, cp -ifR, mv -ivRf)
----------------------------------------------
한글파일은 소스, 주석, 명령어설명등 보고서 형식입니다.
목차
1. 제목
2. 목적
3. 개요
4. 내용
5. 실행결과
6. 첨부(소스코드,주석)
7. 토의
8. 참고자료
본문내용
* 소스 일부
⇒ myls.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <unistd.h>
4 #include <dirent.h>
5 #include <errno.h>
6 #include <string.h>
7 #include <time.h>
8 #include <sys/stat.h>
9 #include <pwd.h>
10 #include <sys/types.h>
11 #include <unistd.h>
12 #include <grp.h>
13
14 #define CTIME_SIZE 26
15 int perm= 0, acctime= 0,fsize= 0,ftype= 0,clink= 0,user= 0,hide= 0, recur =0;
16
17
18 static void check_file_permission(struct stat *buf)
19 {
20
21 char per_buf[11] =
참고 자료
UNIX SYSTEMS Programming (KAY A. AOBBINS STEVEN ROBBINS)
유닉스 시스템 프로그래밍(정재은, 한빛 미디어)