linux #3 basic commands #2 (리눅스 - 기본 명령어 #2)

8) head, tail(기본 10줄) - 텍스트 파일의 앞 10줄, 뒤 10줄 기본 출력하는 명령입니다. - 형식 #head -line text #tail -line text #tail -f log_file (-f: file open, 실시간으로 추가되는 내용을 확인 할 수 있습니다.) 9) more - 장문의 텍스트 출력 시 사용합니다. 페이지 단위로 끊어 사용자에게 보여주고  내부 명령을 이용하여 페이지 진행이 가능합니다. #more text ----------------------------------------------------- ...

linux #2 basic commands #1 (리눅스 - 기본 명령어 #1)

1.시스템 레벨(Run level) - 시스템 운영을 위해 시스템의 부팅 단계를 레벨로 표시합니다. - 구분 0: poweroff 1: Single user mode 2: Multi user mode(CLI) commend line interface, 공유금지 3: Multi user mode(CLI) 공유가능 4: x 5: Xwindow multi user mode 6: Reboot #init 0 #who -r  상태정보확인 2. man (On-line manual) ...

Symmetric Cipher Model #1 (고전암호 대칭 암호 모델 #1)

용어정리 plaintext(평문) - 원래의 메세지 ciphertext(암호문) - 코드화된 메세지 enciphering(암호화)/encryption(암호) - 평문을 암호문으로 변환 deciphering(복호화)/decryption(복호) - 암호문을 평문으로 변환 cryptography(암호기법) - 암호에 사용된 기법들의 연구 분야 cryptographic system(암호 시스템)/cipher(암호법)...

Security #1 (보안)

Security 정보 보안은 정보를 훼손하려는 행위(Security Attack)로 부터 서비스 (Security Service)를 제공하여 공격으로부터 Detect(탐지), Prevent(방지), Recover(복구) (Security Mechanism) 하는 행위입니다. Security Attack(공격 유형) 공격...

linux kernel Module programming #2 Device driver (리눅스 커널 모듈 프로그래밍 #2 디바이스 드라이버)

#include<linux/init.h> #include<linux/kernel.h> #include<linux/module.h> #include<linux/fs.h> #include<asm/uaccess.h> #include<linux/cdev.h> #define DEVICE_NAME "Minibuf" #define BUFFER_LEN 1024 #define DEV_MAJOR 254 #define DEV_MINOR 5 static int s_bDeviceOpen...

C language - 6. pointer(포인터)

1.  메모리와 주소 컴퓨터의 메인메모리는 1byte 단위로 각각 주소가 16진수의 고정된 값이 배정되며 오른쪽 그림을 예를 들어 int(4bytes)형 변수 a를 선언 한다고 했을 때 임의의 연결된 4bytes의 공간에 int형 변수 a가 배정되게 됩니다. 이 때 배정된 4개의 공간중 가장 작은 주소값인 0x000102가 변수 a의 메모리 주소값이 됩니다.  2....

linux kernel Module programming #1 (리눅스 커널 모듈 프로그래밍)

커널은 기본적으로 두가지로 나누어집니다.첫번째로는 Monolithic-Kernel(일체형)이 있고 Micro Kernel이 있습니다. Monolithic-Kernel  리눅스나 윈도우등에서 사용되는 Monolithic-Kernel은 일체형 커널로써 프로세스관리나 메모리관리 파일시스템등이 커널에 포함되어 있습니다. 그래서 운영체제의 기능을 불러오기 위해선 시스템 콜을 이용합니다. Micro-Kernel  커널을...

Raspberry pi ultrasonic sensor(라즈베리파이 초음파 센서)

라즈베리파이와 함께 사용한 초음파 센서 HC-SR04입니다. 초음파 센서의 Vcc부분은 라즈베리파이의 5V부분에 GND부분은 GND에 결합했고 TRIG핀은 P24 ECHO핀은 P23에 결합했습니다. TRIG핀인 P24는 wiringPi에서 5번핀 ECHO핀인 P23는 wiringPi에서 4번핀에 해당합니다. 아래는 테스트 소스코드입니다. #include<stdio.h> #include<wiringPi.h> #define...

multithreading network programming - 3. multi client echo server(멀티스레드 네트워크 프로그래밍 - 다중접속 에코서버)

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional...

add system call in linux 3.8 (리눅스 3.8 시스템 콜 추가)

32bit 리눅스의 경우 1. (커널 폴더)/arch/x86/syscalls/syscall_32.tbl에 아래와 같이 351번을 추가해줍니다. 64bit 리눅스의 경우 1. (커널 폴더)/arch/x86/syscalls/syscall_64.tbl에 아래와 같이 314번을 추가해줍니다. 아래부터는 공통입니다. 3. (커널 폴더)/include/linux/syscalls.h에...

add system call in linux 2.6 (리눅스 2.6 시스템 콜 추가)

32bit 리눅스의 경우 1. (커널 폴더)/arch/x86/kernel/syscall_table_32.S에 아래와같이 sys_addcall을 추가합니다. 2. (커널 폴더)/arch/x86/include/asm/unistd_32.h에 아래와같이 341번을 추가하고  #define NR_syscalls 의 넘버를 +1 증가시켜줍니다. 64bit 리눅스의...

install wiringpi on raspberry pi(라즈베리파이 - 링파이 설치)

WiringPi WringPi는 라즈베리파이의 GPIO포트를 컨트롤하기 위해 제공되는 라이브러리입니다. 아래 주소에서 API 함수를 확인 할 수 있습니다. https://projects.drogon.net/ 홈페이지의 다운로드 and 인스톨 방법입니다. https://projects.drogon.net/raspberry-pi/wiringpi/download-and-install/ 1....