Linux/Ubuntu2010. 5. 7. 11:03
Synaptic Package Manager에서 삭제를 하다 보면 아래와 같은 메뉴가 뜬다.


Mark for Removal 과
Mark for Complete Removal

한글로는 아마도..
삭제
완전삭제 였던거 같은데

"Complete / 완전" 이라는 단어 하나로 인해서 혼동을 주고 있는 나쁜 녀석이다 ㄱ-


Ordinary removal is equivalent to "sudo apt-get remove application" using terminal. It removes the software but preserves the configurations files. On your next installation of the same software or a newer version the configuration files will be reused.

Complete removal is equivalent to "sudo apt-get remove --purge application" using terminal. It removes the software and erases the configurations files as well.

[링크 : http://ubuntuforums.org/showthread.php?t=388278]

음.. complete가 맞긴하네 -ㅁ-!
아무튼, 완전 삭제는 환경설정 파일까지 전부 삭제하는 것이고
삭제는 환경설정 파일은 남겨두고 프로그램만 삭제하는 것이다.

윈도우 기준으로 말하자면 '삭제' 정도면 충분하고
깔끔이들은 완전삭제를 하면 되겠다.

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu 10.04 설치패키지 목록  (4) 2010.05.09
Ubuntu 10.04 LTS 환상이야!  (0) 2010.05.09
Ubuntu 10.04 LTS!  (0) 2010.05.07
udevinfo -> udevadm  (0) 2010.05.03
apache2 환경설정  (0) 2010.04.03
Posted by 구차니
Linux/Ubuntu2010. 5. 7. 09:50
뒷북 둥둥둥~


RC(Release Candidate) 나온 글을 봤지만.. 벌써 나올줄이야 -ㅁ-!
하긴.. 2010년 4월 릴리즈 치고는 늦게 나온건가?

이번에는.. 포맷하고 깔까 그냥 업그레이드 할까 -ㅁ-

'Linux > Ubuntu' 카테고리의 다른 글

Ubuntu 10.04 LTS 환상이야!  (0) 2010.05.09
시냅틱 꾸러미 관리자에서 삭제/완전삭제가 모야?  (0) 2010.05.07
udevinfo -> udevadm  (0) 2010.05.03
apache2 환경설정  (0) 2010.04.03
우분투에 Apache / PHP / Mysql 설치하기  (0) 2010.04.02
Posted by 구차니
Linux2010. 5. 4. 00:56
TC-1100 에는 QuickLook 이라는 기능이 있고
내부적으로는 netbsd 기반으로 작동한다.

QLook
QLook.bt
QLook.gz [netbsd.tmp]

두개의 파일과 하나의 QLook 폴더가 있고, 폴더 안에는 웹페이지가 있다.
QLook.bt 파일에는
dosboot [-u] [-c <commands>] [-i] [filename [-bootopts]]
Welcome to QuickLook. Your information is being loaded...
QLOOK   GZ
inflate 1.1.3 Copyright 1995-1998 Mark Adler
NetBSD/i386 FAT Boot
1.5
Mon Sep  8 14:45:44 PDT
raptor@netbsdbuild.phoenix.com
이런 문장들이 보인다.

QLook.gz의 압축을 해제하면
netbsd.tmp 라는 파일이 나오고, 이 파일은 ELF 헤더를 지니고 있다.

아무튼, SD 메모리는 FAT로 포맷해야 하며
지정된 파일(QLook.bt)를 읽어들이도록 되어있는 것으로 보인다.
특이하게도, QuickLook 으로 부팅하면 BIOS를 거치지 않는다.

사족 : 혹시나 해서 FAT16에 Grub를 설치하거나 EXT2에 Grub를 설치해도 켜지지 않는다.

[링크 : http://www.tabletpcbuzz.com/showthread.php?s=b1f1e6f7cc7b1ccb53aa4660045faab8&t=4372&page=2]
[링크 : http://www.netbsd.org/docs/network/netboot/intro.i386.html] bosboot help (netboot)
[링크 : http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/i386/stand/dosboot/] dosboot source
[링크 : http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/i386/stand/fatboot/] fatboot source
Posted by 구차니
Linux2010. 5. 3. 21:52
grub-install 이라는 것을 이용해서 특정 장치에 grub를 설치할수 있다.
아래의 예제는 플로피 디스크에 grub를 설치하는 예제이다.
마운트가 /mnt에 되었으므로 grub-install시에 --root-directory를 /mnt로 지정해준다.

# mke2fs /dev/fd0
# mount -t ext2 /dev/fd0 /mnt
# grub-install --root-directory=/mnt fd0
# umount /mnt

[링크 : http://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-using-grub_002dinstall.html]
[링크 : http://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-natively.html]

Posted by 구차니
Linux/Ubuntu2010. 5. 3. 18:21
친구녀석이 우분투에서 udevinfo가 없다고 하길래 검색했더니
이런 간단명료한 결론이!

Re: where is udevinfo?
use udevadm instead.

[링크 : http://ubuntuforums.org/showthread.php?t=1265469]

'Linux > Ubuntu' 카테고리의 다른 글

시냅틱 꾸러미 관리자에서 삭제/완전삭제가 모야?  (0) 2010.05.07
Ubuntu 10.04 LTS!  (0) 2010.05.07
apache2 환경설정  (0) 2010.04.03
우분투에 Apache / PHP / Mysql 설치하기  (0) 2010.04.02
fprintf man page가 왜 없지?!  (0) 2010.03.26
Posted by 구차니
Linux2010. 4. 28. 22:51
APM (Apache - PHP - Mysql)
apache2
php5
mysql-server
패키지를 설치하면 자동으로 서버로 구동하게 된다.

viewvc / cvsgraph / enscript
viewvc
cvsgraph
enscript

기본적으로 설치되는 경로는
/var/www [htdocs]
/usr/lib/cgi-bin [cgi-bin]

/etc/viewvc/viewvc.conf
/etc/viewvc/cvsgraph.conf
[링크 : http://ubuntuforums.org/showthread.php?t=272022]

cvsgraph.conf는 별다르게 수정할건 없으며
viewvc.conf는 상당부분 수정이 가해진다.



위와 같이 설정하고, 설치하면 아래와 같은 화면을 볼수 있다.
repository 전부를 보는 화면.
cvs 하위의 모든 프로젝트를 보여준다.

cvs는 파일별로 revision이 붙으므로 상관없지만
svn은 프로젝트별로 repository를 구성하면
viewvc 구성이 꽤나 까다로워질것으로 예상된다.

위에서
버튼을 누르면 아래와 같은 revision tree가 그래프로 나타난다.

그리고 개별 소스를 클릭하면 아래와 같이 syntax highlight 되어 나타난다.

아직 euc-kr로 설정하는법을 찾지 못해, 한글이 ??? 로 깨어져 나온다.
해결방법은 아래 링크를 참조!

나의 경우에는 viewvc 1.0.5 버전이고
/usr/lib/viewvc/sapi.py 파일에서
UTF-8을 검색하여 EUC-KR로 고쳐주었다. (3곳)

[링크 : http://www.pyrasis.com/main/SubversionWithViewVCForWindows]
[링크 : http://kldp.org/node/50455]

2010/04/28 - [프로그램 사용] - [작업중] cvsweb + cvsgraph + xampp

'Linux' 카테고리의 다른 글

dosboot / netboot / fatboot  (0) 2010.05.04
grub 설치하기  (0) 2010.05.03
enscript  (0) 2010.04.28
readlink() 와 심볼릭 링크, 그리고 inode(아이노드)  (0) 2010.04.20
pwd(getcwd), cd(chdir)  (4) 2010.04.19
Posted by 구차니
Linux2010. 4. 28. 18:09
ascii를 HTML이나 postscript(pdf,ps) 등으로 변환해주는 GNU 툴이다.
원래는 adobe 의 동일 이름 프로그램을 대체하는 free 프로그램에서 시작한듯 하다.

아무튼, cvsweb이나 viewvc에서 enscript를 통해 Syntax Highlight를 지원하는 것으로 보인다.

[링크 : http://www.gnu.org/software/enscript/]

'Linux' 카테고리의 다른 글

grub 설치하기  (0) 2010.05.03
ubuntu 9.10 에서 APM + viewvc + cvsgraph 돌리기  (0) 2010.04.28
readlink() 와 심볼릭 링크, 그리고 inode(아이노드)  (0) 2010.04.20
pwd(getcwd), cd(chdir)  (4) 2010.04.19
wget  (4) 2010.04.10
Posted by 구차니
Linux2010. 4. 20. 22:43
예전글인 이녀석
2008/12/22 - [Linux] - 심볼릭 링크에 대한 미스테리
왜 심볼릭 링크의 크기는 파일크기와 문자열 길이가 동일할까? 라는 의문이 들었는데,
not null-terminated 라고 함은, inode 쪽에서 filename 변수를 가지고,
실제로 filename 변수에는 \0(=NULL)이 없기 때문이 아닐까 싶다.

i-node에는 파일의 속성이 저장되고,
디렉토리 구조체에 파일의 i-node와 파일의 이름이 저장된다.
# vi /usr/include/bits/dirent.h
struct dirent
  {
#ifndef __USE_FILE_OFFSET64
    __ino_t d_ino;
    __off_t d_off;
#else
    __ino64_t d_ino;
    __off64_t d_off;
#endif
    unsigned short int d_reclen;
    unsigned char d_type;
    char d_name[256];           /* We must not include limits.h! */
  };

# vi /usr/include/bits/stat.h
struct stat
  {
    __dev_t st_dev;                     /* Device.  */
    unsigned short int __pad1;
#ifndef __USE_FILE_OFFSET64
    __ino_t st_ino;                     /* File serial number.  */
#else
    __ino_t __st_ino;                   /* 32bit file serial number.    */
#endif
    __mode_t st_mode;                   /* File mode.  */
    __nlink_t st_nlink;                 /* Link count.  */
    __uid_t st_uid;                     /* User ID of the file's owner. */
    __gid_t st_gid;                     /* Group ID of the file's group.*/
    __dev_t st_rdev;                    /* Device number, if device.  */
    unsigned short int __pad2;
#ifndef __USE_FILE_OFFSET64
    __off_t st_size;                    /* Size of file, in bytes.  */
#else
    __off64_t st_size;                  /* Size of file, in bytes.  */
#endif
    __blksize_t st_blksize;             /* Optimal block size for I/O.  */

#ifndef __USE_FILE_OFFSET64
    __blkcnt_t st_blocks;               /* Number 512-byte blocks allocated. */
#else
    __blkcnt64_t st_blocks;             /* Number 512-byte blocks allocated. */
#endif
#ifdef __USE_MISC
    /* Nanosecond resolution timestamps are stored in a format
       equivalent to 'struct timespec'.  This is the type used
       whenever possible but the Unix namespace rules do not allow the
       identifier 'timespec' to appear in the  header.
       Therefore we have to handle the use of this header in strictly
       standard-compliant sources special.  */
    struct timespec st_atim;            /* Time of last access.  */
    struct timespec st_mtim;            /* Time of last modification.  */
    struct timespec st_ctim;            /* Time of last status change.  */
# define st_atime st_atim.tv_sec        /* Backward compatibility.  */
# define st_mtime st_mtim.tv_sec
# define st_ctime st_ctim.tv_sec
#else
    __time_t st_atime;                  /* Time of last access.  */
    unsigned long int st_atimensec;     /* Nscecs of last access.  */
    __time_t st_mtime;                  /* Time of last modification.  */
    unsigned long int st_mtimensec;     /* Nsecs of last modification.  */
    __time_t st_ctime;                  /* Time of last status change.  */
    unsigned long int st_ctimensec;     /* Nsecs of last status change.  */
#endif
#ifndef __USE_FILE_OFFSET64
    unsigned long int __unused4;
    unsigned long int __unused5;
#else
    __ino64_t st_ino;                   /* File serial number.  */
#endif
  };

다르게 생각해 보자면,
directory table에 파일 이름이 저장되고, (심볼릭 링크)
속성으로 심볼릭 링크가 지정되며,
inode의 filesize는 string이 아닌 data로서 \0(=NULL)이 빠진 순수한 원본 경로만 들어가서
ls 시의 심볼릭 링크 파일의 크기가 예상과 달리 -1 크기로 나오는게 아닐까 싶다.

#include <unistd.h>
ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize);

Return Value
Upon successful completion, readlink() shall return the count of bytes placed in the buffer. Otherwise, it shall return a value of -1, leave the buffer unchanged, and set errno to indicate the error.

[링크 : http://linux.die.net/man/3/readlink]

The readlink function gets the value of the symbolic link filename. The file name that the link points to is copied into buffer. This file name string is not null-terminated; readlink normally returns the number of characters copied. The size argument specifies the maximum number of characters to copy, usually the allocation size of buffer.

[링크 : http://www.gnu.org/s/libc/manual/html_node/Symbolic-Links.html]

APPLICATION USAGE
    Conforming applications should not assume that the returned contents of the symbolic link are null-terminated.

RATIONALE
    Since IEEE Std 1003.1-2001 does not require any association of file times with symbolic links, there is no requirement that file times be updated by readlink(). The type associated with bufsiz is a size_t in order to be consistent with both the ISO C standard and the definition of read(). The behavior specified for readlink() when bufsiz is zero represents historical practice. For this case, the standard developers considered a change whereby readlink() would return the number of non-null bytes contained in the symbolic link with the buffer buf remaining unchanged; however, since the stat structure member st_size value can be used to determine the size of buffer necessary to contain the contents of the symbolic link as returned by readlink(), this proposal was rejected, and the historical practice retained.

[링크 : http://www.opengroup.org/onlinepubs/000095399/functions/readlink.html]

'Linux' 카테고리의 다른 글

ubuntu 9.10 에서 APM + viewvc + cvsgraph 돌리기  (0) 2010.04.28
enscript  (0) 2010.04.28
pwd(getcwd), cd(chdir)  (4) 2010.04.19
wget  (4) 2010.04.10
/dev의 major minor에 대하여  (0) 2010.04.08
Posted by 구차니
Linux2010. 4. 19. 17:13
리눅스에서 cd는 디렉토리를 변경하고,
pwd는 현재 작업 디렉토리를 보여준다.

그걸 api 수준에서 보자면
cd는 chdir() 이고
pwd는 getcwd() 이다.

long getcwd(char *buf, unsigned long size);

#include <unistd.h>
int chdir(const char *path);
int fchdir(int fd);

[링크 : http://linux.die.net/man/3/getcwd]
[링크 : http://linux.die.net/man/3/chdir]


2010.04.20 추가

코드샘플
#include "unistd.h"

void main()
{
	int ret;
	char buff[256];
	
	getcwd(buff, 255);
	printf("%s\n",buff);
	
	ret = chdir("/etc");

	getcwd(buff, 255);
	printf("%s\n",buff);	
}

Posted by 구차니
Linux2010. 4. 10. 18:11
wget은 머의 약자일려나.. 혹시.. ftp의 get 명령어를 Web에서 한다고 wget 이려나?

아무튼, wget은 Ubuntu 9.10에서 2010-04-10 에 1.11.4 버전을 유지하고있다.
$ wget -V
GNU Wget 1.11.4

Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Currently maintained by Micah Cowan <micah@cowan.name>.
gnu 에서는 1.12 가 최신인데 짝수버전은 피하는 성격상 11.4를 넣은것으로 생각된다.

[링크 : http://www.gnu.org/software/wget/]
[링크 : http://ftp.gnu.org/gnu/wget/]


그리고, wget이 필요로 하는 라이브러리는 다음과 같다.
$ ldd /usr/bin/wget
        linux-gate.so.1 =>  (0xb78c7000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb78ac000)
        librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb78a3000)
        libssl.so.0.9.8 => /lib/i686/cmov/libssl.so.0.9.8 (0xb785c000)
        libcrypto.so.0.9.8 => /lib/i686/cmov/libcrypto.so.0.9.8 (0xb7716000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb75d1000)
        /lib/ld-linux.so.2 (0xb78c8000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb75b8000)
        libz.so.1 => /lib/libz.so.1 (0xb75a2000)

파일은 대략 237K 이다.(보기보다 덩치가 큰녀석이다!)
$ ll /usr/bin/wget
-rwxr-xr-x 1 root root 242516 2009-10-07 00:12 /usr/bin/wget

busybox 에서는 cookie 관련 내용은 빠져있는 것으로 생각된다.
wget

    wget [-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document file]
        [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
        [-U|--user-agent agent] url

    Retrieve files via HTTP or FTP

    Options:

            -s      Spider mode - only check file existence
            -c      Continue retrieval of aborted transfer
            -q      Quiet
            -P      Set directory prefix to DIR
            -O      Save to filename ('-' for stdout)
            -U      Adjust 'User-Agent' field
            -Y      Use proxy ('on' or 'off')

[링크 : http://www.busybox.net/downloads/BusyBox.html]

Posted by 구차니