파일방2009. 8. 3. 15:52
대부분의 원격이 D3D에서 지원 안되는 문제가 있었는데
이녀석은 되다고 한다.

나중에 해봐야지 -ㅁ-

[링크 : http://www.teamviewer.com/index.aspx]

'파일방' 카테고리의 다른 글

SETI@home lunatics optimizer  (0) 2009.10.14
TFTP server for windows  (0) 2009.08.24
UFO:AI 임시 번역본  (0) 2009.03.07
Dual time clock  (0) 2009.02.04
공개 시리얼 프로그램(터미널) - free terminal program(RS-232)  (6) 2009.01.21
Posted by 구차니
Linux2009. 8. 3. 14:54
$ ll /proc/cmdline
-r--r--r-- 1 root root 0 Aug  3 14:52 /proc/cmdline

보다시피 파일 시스템 상에서 파일 크기가 0으로 나온다.
그런 이유로 stat , fseek + ftell 을 해도 크기가 0으로 밖에 나오지 않는다.


아무튼 결국에 파일길이를 알아내지 못하므로
그냥 while(!feof(fp)) 로 일일이 길이 체크 하면서 읽어와야 한다.
Posted by 구차니
awk의 가장 유용한 사용방법은
awk '{print $1}' 가 아닐까 생각이 된다.
일단 1번부터 시작하여 n 번째의 문자열을 출력해주며
문자열은 공백으로 구분한다.

예를 들어
/proc/cmdline의 경우
$ cat /proc/cmdline
ro root=/dev/VolGroup00/LogVol00 rhgb quiet

인데 awk를 사용할 경우
$ cat /proc/cmdline | awk '{print $1}'
ro
$ cat /proc/cmdline | awk '{print $2}'
root=/dev/VolGroup00/LogVol00
$ cat /proc/cmdline | awk '{print $3}'
rhgb
$ cat /proc/cmdline | awk '{print $4}'
quiet
$ cat /proc/cmdline | awk '{print $5}'

이런식으로 구분을 하여 옵션별로 떼어낼 수 있다.


$ cat /proc/cmdline | awk '{print NF}'
4
NF는 내부 변수로 컬럼의 갯수를 알려준다.


[링크 : http://www.grymoire.com/Unix/]
Posted by 구차니
Linux2009. 8. 3. 11:47
SETENV(3)                  Linux Programmer’s Manual                 SETENV(3)

NAME
       setenv - change or add an environment variable

SYNOPSIS
       #include <stdlib.h>

       int setenv(const char *name, const char *value, int overwrite);

       int unsetenv(const char *name);

DESCRIPTION
       The  setenv()  function  adds the variable name to the environment with the value value, if name does not already
       exist.  If name does exist in the environment, then its value is changed to value if overwrite  is  non-zero;  if
       overwrite is zero, then the value of name is not changed.

       The unsetenv() function deletes the variable name from the environment.

RETURN VALUE
       The  setenv()  function  returns  zero on success, or -1 if there was insufficient space in the environment.  The
       unsetenv() function returns zero on success, or -1 on error, with errno set to indicate the cause of the error.

ERRORS
       EINVAL name contained an ’=’ character.

CONFORMING TO
       4.3BSD, POSIX.1-2001.

NOTES
       Prior to glibc 2.2.2, unsetenv() was prototyped  as  returning  void;  more  recent  glibc  versions  follow  the
       POSIX.1-2001-compliant prototype shown in the SYNOPSIS.

BUGS
       POSIX.1-2001  specifies  that if name contains an ’=’ character, then setenv() should fail with the error EINVAL;
       however, versions of glibc before 2.3.4 allowed an ’=’ sign in name.

SEE ALSO
       clearenv(3), getenv(3), putenv(3), environ(7)

BSD                               2004-05-09                         SETENV(3)


환경변수를 바꾸어 보려고 했더니, 프로그램 종료 후에는 그 환경변수를 사라지는 문제가 발생했다.
혹시나 해서 찾아 봤더니 원래 그렇다고 한다.
음.. 고정시키는 방법은 없을려나..

고정 시키려면  직접적으로 할 수는 없고, 스크립트를 하나 만들어 실행시키는 방법외에는 없다고 한다.

[링크 : http://kldp.org/node/88770]


그리고, setenv() 사용시, 변수 치환은 되지 않는다.
예를 들어 A=str B=test 로 선언하고
setenv("C","$A $B",1) 라고 해도 C=str test 로 입력되지 않는다.

[링크 : http://forum.falinux.com/zbxe/?document_srl=408397]
Posted by 구차니
Linux2009. 8. 1. 13:04
var=$(cat filename)



참~~~ 쉽죠~
(찾는데 한참 걸림 ㅠ.ㅠ)


[링크 : http://wonylog.tistory.com/192]
[링크 : http://ttongfly.net/zbxe/?document_srl=45340&mid=scriptprogramming]
Posted by 구차니
Linux2009. 7. 31. 18:59
ip - show / manipulate routing, devices, policy routing and tunnels

   ip route flush - flush routing tables
       this command flushes routes selected by some criteria.

       The arguments have the same syntax and semantics as the arguments of ip route show, but routing  tables  are  not
       listed but purged.  The only difference is the default action: show dumps all the IP main routing table but flush
       prints the helper page.

       With the -statistics option, the command becomes verbose. It prints out the number of deleted routes and the num-
       ber  of  rounds  made to flush the routing table. If the option is given twice, ip route flush also dumps all the
       deleted routes in the format described in the previous subsection.

ip link show [ DEVICE ]
ip route { list | flush } SELECTOR

ip route flush [dev]
라고 하면 한번에 플러시가 된다...

ex) ip route flush eth0

--------------
2009.08.05 해보니 안된다... ㄱ- 뭥미?

ip route flush all
하니 전체 플러시가 된다...(먼산)
Posted by 구차니
Linux2009. 7. 31. 13:40
start-stop-daemon은 rc.d 에서 사용하는 녀석인데..
프로그램인지, 스크립트인지는 모르겠다.


간단하게 데몬 프로그램을 실행하고 자동으로 추적해서 죽이는 녀석이다.
service xinetd start / stop / restart
등의 녀석을 구현해주는 착한 녀석이다.

OPTIONS

-x|--exec executable
    Check for processes that are instances of this executable (according to /proc/pid/exe ).
-p|--pidfile pid-file
    Check whether a process has created the file pid-file.
-u|--user username|uid
    Check for processes owned by the user specified by username or uid.
-g|--group group|gid
    Change to group or gid when starting the process.
-n|--name process-name
    Check for processes with the name process-name (according to /proc/pid/stat).

아무튼, -x 로 되어서 제대로 찾지를 못해 죽이지 못하길래
-n 으로 해주었더니 인자에 문제가 있었는지 못죽였다.
아무튼 -n의 경우에는 경로가 아니라 실행파일의 이름만 넣어주면 된다.

예를 들어 /sbin/udhcpc의 경우에는
-name udhcpc 하면 종료해준다.





[링크 : http://olympus.het.brown.edu/cgi-bin/man/man2html?start-stop-daemon+8]
Posted by 구차니
싸움이라고 표현하건 한쪽이 무너지거나 사라지기 전까지는
계속 이러한 분쟁이 일어나기 때문이다.

솔찍히 어느한쪽이 잘했거나 잘못했다고 생각하지 않는다.
아마 잘못한건 SSM보다 재래시장이다. 왜냐고? 약자니까.
약자가 되어감에 있어서도 약자라는 이유로 손을 놓고 있었고, 실질적인 재래시장 살리기 방안이나
업그레이드를 할 노력을 하지 않았기 때문에 더더욱 약자로 몰려간 것이다.

재래시장의 장점
아마도 활동감과 살맛이 난다는 것이 아닐까?
갂아도 주고, 이야기도 하면서 부담없이 나들이 할 수 있다는 점.

단점은, 주차가 힘들다는 점(어쩌면 장보러 가는데 차 끌고 가는것도 문제지만)
결제가 항상 현금으로 소액으로 나간다는 점
간혹 바가지가 있다는 점


그에 비해서 SSM은
정찰제에, 주차도 쉽고, 포인트도 쌓아주고, 카드 결제도 아무말 없이 받아준다는 장점이 있다.

하지만, 유통구조로 봤을때, 그 저렴하고 포인트에 카드 결제는 결과적으로
중소규모의 생산자에게 돌아간다. 가격내치기라던가 납품하지 못하게 협박한다거나 이러한 것들 말이다.


아마 win-win 이라는 구조로 갈수가 없게 된다면,
재래시장이 살아날수 있고, SSM에 대응 할 수 있는 또다른 SSM이 되어야 하지 않을까?

아무튼 현상황에서 상인들에게 돈을 요구하는 것은 무리이므로,
나라나 시에서 나서서 재래시장을 업그레이드 해줘야 할 것 같다.

일단 판매자들은 등록을 하고(수익처리를 위해 필수, 필수 정보 몇가지만 등록)
PDA(wireless) + 바코드 프린터 를 제공한다. 물론 시장이 닫을때는 반납

장보러 온 사람들은, 흥정을 해서 그 자리에서 바코드를 찍어 원하는 만큼 담고,
장을 다 보고 난뒤에 카운터로 가서 일괄 계산을 한다.
그렇게 되면 수수료 문제도 상당부분 경감될수 있다.
그러면 재래시장 관리회에서는 그 돈을 바코드로 입력된 개인에게 이체를 해주고(물론 결산후에)
판매자 역시 결산을 해서 돈을 받고 간다.(약간의 수수료로 시장을 유지 하도록 한다거나)

그리고 주차는 근처의 주차장을 제공한다.
아니면 빌딩형 건물에 판매자들을 들여보내(부스처럼 말고 그냥 아무것도 없는 넓은 공간만 있으면 된다)
땅바닥에 앉아서 팔게 하고, 지하 주차장이나 빌딩형 주차장을 만들어 주차공간을 제공한다.

그리고 인원통제를 쉽게 할 수 있도록, 대형 빌딩 혹은 출구를 통제하는 구조로 만들어(일종의 폐쇄공간)
시민들이 구매후 결제하지 않고 나가지 못하도록 구조를 만든다.


물론 상가번영회에서 운영을 한다고 가정했을때
탈세의 위험이나, 수익 분배에 있어 주의를 해야겠지만
재래시장의 SSM 화를 하지 않는 이상에는 결국에 SSM은 강자의 입장으로
재래시장은 약자의 입장으로 죽어 갈수 밖에 없지 않을까 생각이 된다.
Posted by 구차니
솔찍히 내용도 제대로 안보고 그냥 휘갈겨 본다.

혹시.. 그분께서 서민들에게 기회균등하게
전부 대학교를 못가도록 죠낸 비싸게 받겠다는거 아닐까?
하향 평준화된 것도 머.. 기회 균등하게 되는건 맞.겠.지?

[링크 : http://media.daum.net/society/education/view.html?cateid=1012&newsid=20090730171302123&p=yonhap]
Posted by 구차니
프로그램 사용/busybox2009. 7. 30. 17:24

#!/bin/sh

/bin/run-parts --arg=$1 /etc/udhcpc.d

[링크 : http://www.doit.org/udhcpc/udhcpc.script]

#!/bin/sh
# /etc/init.d/udhcpc: start or stop udhcpc client

set -e

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/sbin/udhcpc

test -x $DAEMON || exit 0

case "$1" in
  start)
    echo -n "Starting DHCP client: udhcpc"
    start-stop-daemon --start --quiet --exec $DAEMON \
      -- --script=/etc/udhcpc.script || echo -n " already running"
    echo "."
  ;;

  restart)
    /etc/init.d/udhcpc stop
    /etc/init.d/udhcpc start
  ;;

  reload)
  ;;

  force-reload)
  ;;

  stop)
    echo -n "Stopping DHCP client: udhcpc"
    start-stop-daemon --stop --quiet --exec $DAEMON || echo -n " not running"
    echo "."
  ;;

  renew)
    start-stop-daemon --signal USR1 --stop --quiet --exec $DAEMON || echo -n " not running"
  ;;

  release)
    start-stop-daemon --signal USR2 --stop --quiet --exec $DAEMON || echo -n " not running"
  ;;

  *)
    echo "Usage: /etc/init.d/udhcpc {start|stop|restart|reload|force-reload}"
    exit 1
    ;;
esac

exit 0

[링크 : http://www.doit.org/udhcpc/udhcpc]

[링크 : http://www.doit.org/udhcpc/]
Posted by 구차니