Linux2009. 2. 24. 13:51
hexdiff 라는 윈도우 프로그램도 있긴 하지만 유료인데다가 비교 성능이 그리 좋지 않다.
차이점 부분 내부를 비교 하지 않고 다르다는 정도만 출력한다랄까..
그리고 16M 짜리 바이너리 2개 비교하면 거의 시스템이 죽어 버릴 듯 간당간당하다.

번지를 보면 알 수 있겠지만, 내용이 다르다고 완전 밀어내고 다르다고 표시를 해 놓는 바람에 내용 비교를 할 수 없다.

hexidff[windows]의 단점
드래그 안됨
두개 비교 할려면 매우 번거로움
용량이 크면 비교 하는데 오래걸림
차이점을 제대로 보여주지 못함
EFT Studio 홈페이지 도메인 팔린 듯 (2009.02.24 기준)


그래서 짜증나는 관계로 텍스트 모드이긴 하지만 빠르게 작동하는 녀석을 찾게 되었다.
이름은 Visuel HexDiff
unix 호환버전이고, rpm은 존재하지 않으며 make 해서 설치 해야 한다.

visuel hexdiff의 단점은
address가 16진수가 아닌 10진수로 나온다(옵션 발견 못함) 정도 이다.

사용 방법은 vi와 유사하게 n을 누르면 다음 차이점으로 이동을 한다.
H를 누르면 옆의 주소가 16진수/10진수로 출력이 가능하다.

참고로 아래의 도움말은 ?을 누르면 나온다.
hexdiff --help 해도 아무런 것이 안나오니 다른데서 헤매지 말고 아래의 '?' 페이지를 기억하자


[공식 : http://tboudet.free.fr/hexdiff/]
[다운 : http://tboudet.free.fr/hexdiff/hexdiff.tar.gz]
Posted by 구차니
개소리 왈왈2009. 2. 24. 13:23
200개 포스팅 기념으로 연필 한타스를 샀습니다
문화연필이 더존이라는 상표를 달고 나오는데..
Made in china.
마음 한구석에서 매우 씁쓸해하는 중입니다.






결론 : 인생 그런거임

- 끗 -

'개소리 왈왈' 카테고리의 다른 글

8K의 행복  (6) 2009.02.28
문득 세상이 많이 변했음을 느낀다.  (4) 2009.02.27
소시쥐 뒤질래? ㅡㅡ^  (0) 2009.02.23
연필의 느낌이 그립다.  (5) 2009.02.22
죽다 살아 나다  (6) 2009.02.21
Posted by 구차니
프로그램 사용2009. 2. 24. 11:54
frhed 보다는 확실히 깔끔하다. 하지만 Free라는 이름하에 웬만한 기능은 다 막혀 있다 보니,
순수하게 HEX Editor로서 bit 연산이라는 측면에서는 frhed보다 좋아 보인다.

Free Hex Editor Neo의 Operations 메뉴, 아이콘들이 참 아기자기 하다
문제는.. 저 기능들을 막상 사용하려 하면 Free 버전이라 알리는 메시지가 뜬다.. 쓰라는거냐 말라는거냐 ㄱ-

Free Hex Editor Neo의 Edit 메뉴, Modify bits의 UI는 Frhed에 비해서 상당히 깔끔하다.

참고사항 : frhed의 manupulate bits 윈도우. Neo가 깔끔하긴 하다.

Free Hex Editor Neo의 Tools 메뉴 - Run Disassembler?!?!?

그럼 그렇지 Free라서 했더니 전부 쓸만한 기능은 막아놨다 ㄱ-


원래는 Free Serial Port Manager 라는게 검색되서 나와서 원래 회사에 받으러 갔는데 Free 버전은 없어졌는지
Trial만 있길래 다른걸 찾다가 발견하게 되었다. 확실히 아이콘은 귀엽고 UI는 깔끔하지만 무료 버전은 Frhed도
충분히 커버가능할 정도로 약한 기능에 실망만 더했다.

[공식 : http://www.hhdsoftware.com/Products/home/hex-editor-free.html]
Posted by 구차니
Programming/C Win32 MFC2009. 2. 24. 11:01
상당히 즐겨보고 애용하는 문서 입니다.
ANSI C에 관련된 함수 정리 및 어떤 파일에 어떤 함수가 있는지를 쉽게 알 수 있고
함수의 프로토타입과 설명이 있어서 C언어 프로그래머들에게 매우 유용한 자료입니다.

2.   Library
     2.1  assert.h
          2.1.1     assert
     2.2  ctype.h
          2.2.1     is... Functions
          2.2.2     to... Functions
     2.3  errno.h 
          2.3.1     EDOM
          2.3.2     ERANGE
          2.3.3     errno   
     2.4  float.h
          2.4.1     Defined Values
     2.5  limits.h
          2.5.1     Defined Values
     2.6  locale.h
          2.6.1     Variables and Definitions
          2.6.2     setlocale
          2.6.3     localeconv
     2.7  math.h
          2.7.1     Error Conditions
          2.7.2     Trigonometric Functions
               2.7.2.1   acos
               2.7.2.2   asin
               2.7.2.3   atan
               2.7.2.4   atan2
               2.7.2.5   cos
               2.7.2.6   cosh
               2.7.2.7   sin
               2.7.2.8   sinh
               2.7.2.9   tan
               2.7.2.10  tanh
          2.7.3     Exponential, Logarithmic, and Power Functions
               2.7.3.1   exp
               2.7.3.2   frexp
               2.7.3.3   ldexp
               2.7.3.4   log
               2.7.3.5   log10
               2.7.3.6   modf
               2.7.3.7   pow
               2.7.3.8   sqrt
          2.7.4     Other Math Functions
               2.7.4.1   ceil
               2.7.4.2   fabs
               2.7.4.3   floor
               2.7.4.4   fmod
     2.8  setjmp.h
          2.8.1     Variables and Definitions
          2.8.2     setjmp
          2.8.3     longjmp
     2.9  signal.h
          2.9.1     Variables and Definitions
          2.9.2     signal
          2.9.3     raise
     2.10 stdarg.h
          2.10.1    Variables and Definitions
          2.10.2    va_start
          2.10.3    va_arg
          2.10.4    va_end
     2.11 stddef.h
          2.11.1    Variables and Definitions
     2.12 stdio.h
          2.12.1    Variables and Definitions
          2.12.2    Streams and Files
          2.12.3    File Functions
               2.12.3.1  clearerr
               2.12.3.2  fclose
               2.12.3.3  feof
               2.12.3.4  ferror
               2.12.3.5  fflush
               2.12.3.6  fgetpos
               2.12.3.7  fopen
               2.12.3.8  fread
               2.12.3.9  freopen
               2.12.3.10 fseek
               2.12.3.11 fsetpos
               2.12.3.12 ftell
               2.12.3.13 fwrite
               2.12.3.14 remove
               2.12.3.15 rename
               2.12.3.16 rewind
               2.12.3.17 setbuf
               2.12.3.18 setvbuf
               2.12.3.19 tmpfile
               2.12.3.20 tmpnam
          2.12.4    Formatted I/O Functions
               2.12.4.1  ...printf Functions
               2.12.4.2  ...scanf Functions
          2.12.5    Character I/O Functions
               2.12.5.1  fgetc
               2.12.5.2  fgets
               2.12.5.3  fputc
               2.12.5.4  fputs
               2.12.5.5  getc
               2.12.5.6  getchar
               2.12.5.7  gets
               2.12.5.8  putc
               2.12.5.9  putchar
               2.12.5.10 puts
               2.12.5.11 ungetc
          2.12.7    Error Functions
               2.12.7.1  perror
     2.13 stdlib.h
          2.13.1    Variables and Definitions
          2.13.2    String Functions
               2.13.2.1  atof
               2.13.2.2  atoi
               2.13.2.3  atol
               2.13.2.4  strtod
               2.13.2.5  strtol
               2.13.2.6  strtoul
          2.13.3    Memory Functions
               2.13.3.1  calloc
               2.13.3.2  free
               2.13.3.3  malloc
               2.13.3.4  realloc
          2.13.4    Environment Functions
               2.13.4.1  abort
               2.13.4.2  atexit
               2.13.4.3  exit
               2.13.4.4  getenv
               2.13.4.5  system
          2.13.5    Searching and Sorting Functions
               2.13.5.1  bsearch
               2.13.5.2  qsort
          2.13.6    Math Functions  
               2.13.6.1  abs
               2.13.6.2  div
               2.13.6.3  labs
               2.13.6.4  ldiv
               2.13.6.5  rand
               2.13.6.6  srand
          2.13.7    Multibyte Functions
               2.13.7.1  mblen
               2.13.7.2  mbstowcs
               2.13.7.3  mbtowc
               2.13.7.4  wcstombs
               2.13.7.5  wctomb
     2.14 string.h
          2.14.1    Variables and Definitions
          2.14.2    memchr
          2.14.3    memcmp
          2.14.4    memcpy
          2.14.5    memmove
          2.14.6    memset
          2.14.7    strcat
          2.14.8    strncat
          2.14.9    strchr
          2.14.10   strcmp
          2.14.11   strncmp
          2.14.12   strcoll
          2.14.13   strcpy
          2.14.14   strncpy
          2.14.15   strcspn
          2.14.16   strerror
          2.14.17   strlen
          2.14.18   strpbrk
          2.14.19   strrchr
          2.14.20   strspn
          2.14.21   strstr
          2.14.22   strtok
          2.14.23   strxfrm
     2.15 time.h 
          2.15.1    Variables and Definitions
          2.15.2    asctime
          2.15.3    clock
          2.15.4    ctime
          2.15.5    difftime
          2.15.6    gmtime
          2.15.7    localtime
          2.15.8    mktime
          2.15.9    strftime
          2.15.10   time
머.. 위에 링크 내용만 보면 필요 하신분들은 알아서 아래 다운을 클릭 하시기를 -ㅁ-

참고 사항으로
c_guide.tar.gz 26-Feb-2002 14:50 202K <- 업데이트 안된지 오래된 문서입니다만, reference인 관계로 오래된 만큼 치명적인
문제점은 없다고 보여 집니다.

[다운 : http://www.acm.uiuc.edu/webmonkeys/book/c_guide.tar.gz]
[링크 : http://www.acm.uiuc.edu/webmonkeys/book/c_guide/index.html]
Posted by 구차니
Linux2009. 2. 23. 17:34
카페에서 우연히 주워들은 프로그램이름인데..
검색해보니 readelf가 조금 더 분석에 강력하다고 한다.

#include <stdio.h>

void main()
{
        unsigned char b = 0xF1;
        unsigned short c = 0xF1;
        unsigned int d = 0xF1;

        printf("%X\n",b);
        printf("%X\n",c);
        printf("%X\n",d);
}


위의 소스를 분석한 내용이다. 내용이 많으므로 눌러서 보기바람.

$ gcc -S test.c
$ more test.s

$ gcc -Wl,-Map -Wl,test.map test.c
$ more test.map

$ gcc test.c
$ objdump -x a.out

$ readelf -a a.out

$ ldd a.out

솔찍히 머가 먼지 모르겠다.

덧 : 생각해보니 이것저것 생각나는거 다 붙이다 보니 제목이 안 맞네 ㄱ- 바꿔야 하나?

'Linux' 카테고리의 다른 글

rdate - get the time via the network  (0) 2009.03.02
Visuel Hexdiff - console based visual hex diff  (4) 2009.02.24
ln의 반대말은? - unlink  (0) 2009.02.23
sleep 함수들  (0) 2009.02.22
ls 와 친해지기 - 디렉토리만 봅시다!  (0) 2009.02.22
Posted by 구차니

문제가 되는 녀석은 "비교시 파일 시간 보호" 라는 녀석인데
도움말이 영어다보니.. 바로 눈에 안들어 와서 한참 걸렸다..

2.7. Preserve file time in file compare

  • Disabled (default): If you save changes to a file in WinMerge, the timestamp of the file is updated.

  • Enabled: If you save changes to a file in WinMerge, the timestamp of the file is not changed in your file system.


물론 기본값은 disable(체크 꺼짐) 이지만, 먼가 좋은건줄 알고 켜놨더니,
cvs에서도 날짜 기반으로 체크하다 보니, 날짜가 바뀌지 않아 최신 버전인줄 착각하고 있었고,
makefile 역시도 날짜 기반으로 체크하니 동일한 문제로 인해 컴파일을 다시 하지 않았다.


cvs/makefile 뿐만 아니라 다른 source형상 관리 프로그램들 모두 시간에 민감할테니
되도록이면 이 옵션은 기본값인 disable 한채로 쓰는게 좋을 듯 하다.
Posted by 구차니
Araxis나 WinMerge나 이녀석들이 보기에는 소스코드가 아니면 전부 바이너리로 밖에 보이지 않는지라,
이러한 파일들의 내용을 알 수 없기에, 바이너리의 버전 관리는 상당히 힘든 문제가 발생한다.


위의 사진은 WinMerge로 xls 파일을 비교한 내용이다.(물론 합성! 실제로는 저 에러가 먼저 뜨고 내용이 뜬다)
바이너리라서 전혀 이해할 수도, 볼 수도 없다.

하.지.만!
플러그인을 사용하면 아래와 같이 텍스트로 내용을 볼 수 있다.
(물론 병합/Merge를 할 수 있지는 않다. 단지 내용을 볼 수 있을 뿐이다)


어떻게 보면 병합도 못하는데 무슨 소용이냐? 라고 할 수 있겠지만,
글쎄?
일일이 비교도 안되는 엑셀의 내용을 뚫어라 쳐다보면서 비교점을 찾을 수 있다면서 필요 없겠지만,
최소한 무슨 내용이 변경되었는지 알 수 있는 것과 비교 한다면 천지 차이가 아닐려나?



xdocdiff WinMerge Plugin -Compare Word, Excel, PowerPoint, pdf-With this plugin, you can compare these files.
.rtf Rich Text
.docx/.docm Microsoft WORD 2007(OOXML)
.xlsx/.xlsm Microsoft Excel 2007(OOXML)
.pptx/.pptm Microsoft PowerPoint 2007(OOXML)
.doc
Microsoft WORD ver5.0/95/97/2000/XP/2003
.xls Microsoft Excel ver5.0/95/97/2000/XP/2003
.ppt Microsoft PowerPoint 97/2000/XP/2003
.sxw/.sxc/.sxi/.sxd OpenOffice.org
.odt/.ods/.odp/.odg Open Document
.wj2/wj3/wk3/wk4/123 Lotus 123
.wri Windows3.1 Write
.pdf Adobe PDF
.mht Web Archive
.eml Exported files from OutlookExpress

outlook 외부 저장파일 까지 지원을 한다. 실질적으로 거의 모든 문서를 지원한다고 보면된다.
(아래한글이 없잖아! 이러면 곤란)

[링크 : http://freemind.s57.xrea.com/xdocdiffPlugin/en/index.html]


Posted by 구차니
Linux2009. 2. 23. 10:50
ln -s 로 심볼릭 링크를 만들면 만들어 지는데...
문제는 rm으로 삭제가 안된다.

이럴 때 어떻게 지우냐면은... X-window에서 지운다 -_-v
콘솔에서 명령으로는 어떤것을 사용해야 하는지 몰랐기에 어쩔 수 없는 선택이었지만 말이다 ㄱ-

아무튼 mount의 반대는 umount 이듯
ln의 반대는 unlink랜다

먼가 이상한데? 왜 unln이 아니라 unlink일까? -ㅁ-

[발견 : http://www.newlinuxuser.com/howto-remove-a-symbolic-link/]



궁금중 해결!
ln and link are not same commands.
Link supports Files only. you can't link directories with link command. please check man pages of both commands again.

link and ln (without -s option) are same. Bot creates hard links.
ln with -s option creates soft link.


[발견 : http://www.linuxforums.org/forum/linux-programming-scripting/89240-link-ln.html]
Posted by 구차니
개소리 왈왈2009. 2. 23. 09:51
아침에 지하철을 타고 올 때는 애인과 전화를 하거나(적당하게 지하철이 시끄러우면)
아니면 앉아서 자면서 온다.

그.런.데

오늘따라 옆에 옆에 아가씨가 핸드폰으로 이어폰 만땅해놓고
소녀시대의 Gee를 듣는다.
계속 듣는다. ㄱ-
또 듣는다.


젠장 ㄱ- 무한 반복인가?



결론 : 시끄러워서 못잤다. OTL
사족 : 개인적으로는 살찐 티파니가 좋습니다 *-_-*
Posted by 구차니
Linux2009. 2. 22. 22:06
$ man -k sleep
Time::HiRes          (3pm)  - High resolution alarm, sleep, gettimeofday, interval timers
apmsleep             (1)  - go into suspend or standby mode and wake-up later
clock_nanosleep      (2)  - Suspend execution of the currently running thread
clock_nanosleep      (3p)  - high resolution sleep with specifiable clock (ADVANCED REALTIME)
nanosleep            (2)  - pause execution for a specified time
nanosleep            (3p)  - high resolution sleep (REALTIME)
sleep                (1)  - delay for a specified amount of time
sleep                (1p)  - suspend execution for an interval
sleep                (3)  - Sleep for the specified number of seconds
sleep                (3p)  - suspend execution for an interval of time
usleep               (1)  - sleep some number of microseconds
usleep               (3)  - suspend execution for microsecond intervals
usleep               (3p)  - suspend execution for an interval

usleep은 1초 까지만 잠재울수 있는 제약이 있다.(1,000,000usec = 1,000msec = 1sec)
USLEEP(P)                  POSIX Programmer’s Manual                 USLEEP(P)

NAME
       usleep - suspend execution for an interval

SYNOPSIS
       #include <unistd.h>

       int usleep(useconds_t useconds);

DESCRIPTION
       The  usleep()  function  shall cause the calling thread to be suspended from execution until either the number of
       realtime microseconds specified by the argument useconds has elapsed or a signal  is  delivered  to  the  calling
       thread  and  its action is to invoke a signal-catching function or to terminate the process.  The suspension time
       may be longer than requested due to the scheduling of other activity by the system.

       The useconds argument shall be less than one million. If the value of useconds is 0, then the call has no effect.

sleep은 1초 단위로 무제한으로 쓸수 있다.(실질적인 제약은 시스템에 따라 다르지만 32bit / 64bit unsigned int)
SLEEP(P)                   POSIX Programmer’s Manual                  SLEEP(P)

NAME
       sleep - suspend execution for an interval of time

SYNOPSIS
       #include <unistd.h>

       unsigned sleep(unsigned seconds);

DESCRIPTION
       The  sleep() function shall cause the calling thread to be suspended from execution until either the number of
       realtime seconds specified by the argument seconds has elapsed or a signal is delivered to the calling  thread
       and its action is to invoke a signal-catching function or to terminate the process. The suspension time may be
       longer than requested due to the scheduling of other activity by the system.

       If a SIGALRM signal is generated for the calling process during execution of sleep() and if the SIGALRM signal
       is  being  ignored or blocked from delivery, it is unspecified whether sleep() returns when the SIGALRM signal
       is scheduled. If the signal is being blocked, it is also unspecified whether it remains pending after  sleep()
       returns or it is discarded.

nanosleep은 REALTIME 확장인 듯 한데.. 먼지 모르겠다 ㄱ-
일단은 위의 sleep, usleep과는 다르게 include 파일이 다르다.
NANOSLEEP(P)               POSIX Programmer’s Manual              NANOSLEEP(P)

NAME
       nanosleep - high resolution sleep (REALTIME)

SYNOPSIS
       #include <time.h>

       int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);

DESCRIPTION
       The  nanosleep()  function shall cause the current thread to be suspended from execution until either the time
       interval specified by the rqtp argument has elapsed or a signal is delivered to the calling  thread,  and  its
       action  is to invoke a signal-catching function or to terminate the process. The suspension time may be longer
       than requested because the argument value is rounded up to an integer multiple  of  the  sleep  resolution  or
       because  of the scheduling of other activity by the system. But, except for the case of being interrupted by a
       signal, the suspension time shall not be less than the time specified by rqtp, as measured by the system clock
       CLOCK_REALTIME.

       The use of the nanosleep() function has no effect on the action or blockage of any signal.



Posted by 구차니