bin/Linux
-
fdiskbin/Linux 2008. 3. 3. 18:11
Disk /dev/sdb (Sun disk label): 256 heads, 64 sectors, 51198 cylinders Units = cylinders of 16384 * 512 bytes Disk /dev/sdc: 1288.4 GB, 1288490188800 bytes 255 heads, 63 sectors/track, 156650 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes 초기화 # fdisk /dev/sdb Command (m for help): o Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. Afte..
-
대용량 파일bin/Linux 2007. 9. 20. 17:40
리눅스에서는 open() 시스템콜의 flag 파라미터에 O_LARGEFILE 옵션을 같이 주면 2G 이상의 파일도 제어할 수 있습니다. 그리고, _LARGEFILE64_SOURCE 와 _FILE_OFFSET_BITS=64 는 약간의 차이가 있는데.. _LARGEFILE64_SOURCE 는 off_t를 32비트로 그대로 사용하는 대신, off64_t 라는 64비트용 변수 타입을 새롭게 정의해서 lseek64()와 같은 함수를 사용할 수 있게 해주고요. _FILE_OFFSET_BITS=64 는 off_t 변수 타입 자체를 32비트에서 64비트로 확장하게 됩니다. DFLAGS += -D_LARGEFILE64_SOURCE DFLAGS += -D_FILE_OFFSET_BITS=64 둘 다를 쓰면 off_t 는 6..
-
function pointerbin/Linux 2007. 9. 18. 14:23
- runtime 값으로 실행할 함수를 결정할 수 있다. - running program 은 main-memory 안에 임의의 위치를 갖는다. - 함수와 &함수가 같은 값을 갖는다. 마치 배열에서 배열명이 첫요소의 첫번째 값을 나타내는 것과 같다 - 관례적으로 fn 이름을 사용한다. * reference 0. The Function Pointer Tutorials http://www.newty.de/fpt/index.html 1. 함수포인터 한글 http://shinluckyarchive.tistory.com/206 include/linux/fs.h typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned); filldir_t 데..