삽입
I: 줄의 제일 앞에서 입력
A: 줄의 제일 끝에서 입력

콤보command
4w: 4단어 skip후 이동
4b: 4단어 skip후 이동
4j,h,k,l: 커서이동시 지정한 수만큼 건너뛰므로 이동을 좀 더 빨리 할 수 있다.

줄의 결합(J)
2줄이 있고, 2째줄을 1째줄 끝에 붙이고 싶다면, 1째줄에서 J를 입력하면 된다.

커서이동
0: 줄의 처음
^: 줄의 처음(글자가 시작되는 처음)
$: 줄의 끝
w: 단어단위 이동
e: w와 같으나 단어의 끝으로 이동
b: w의 반대방향으로 이동
H, M, L: 커서를 화면 상,중,하로 이동

검색(/후 검색할 단어입력)
n: 뒤로 검색
N: 앞으로 검색

매크로
ab aa aaaa: aa를 입력하면 aaaa로 자동변환

치환
s/pattern/replace:   현재줄의 첫번째 matching pattern치환
s/pattern/replace/g: 현재줄의 모든 matching pattern치환
%s/pattern/replace/g:  모든 줄의 치환
line,lines/pattern/replace: 해당 범위의 치환

저장
w>> file: 지정한 파일에 추가

윈도 split
vi내에서 위아래로 윈도가 분활되면서 2개의 파일을 동시에 open/편집할 수 있다.
ex-mode(:프롬프트상태)에서 'sp 파일이름'
윈도우가 전환은 Ctrl+ww

기타
1. d의 경우 command모드로 계속 남아 있으나 c는 삭제후 insert모드로 변환한다.
   cc, c$, cw등은 유용하게 사용될 수 있다.
2. .은 마지막 명령을 되풀이한다.

visual모드
윈도의 텍스트 에디터와 같이 선택부분이 반전되면서 복사,삭제등을 할 수 있다.
v로 visual모드로 집입하여 커서키를 사용해 원하는 부분을 선택한다.
복사는 y, 삭제/잘라내기는 d로 할 수 있다.

vi설정(vim설정)
자신의 홈디렉토리에 .vimrc를 생성하고 다음과 같이 할 수 있다.

set ai
set ts=4
set nu

각각 auto-indent, tab stop, numbering

윈도에서 작업중 vi에 붙여넣기시 계단현상발생 방지
:set paste

위치기억(UltraEdit의 ALT-F2, F2와 동일한 기능)
m{a-z}: 현재위치를 {a-z}로 북마크함
`{a-z}: 기억해둔 {a-z}로 이동. 보통 한개만 등록했다면 그냥 ``를 사용하면 된다.

레코딩
설정파일의 주석추가/삭제시 유용하게 사용할 수 있다.(이미 vi에 매크로기능이 있지만, 레코딩이 UltraEdit의 매크로기능과 유사하다.)
q{a-z}: {a-z}로 레코딩 시작. {a-z}만 가능한게 아니고 실제 {0-9a-zA-Z"}를 적기 번거로워 이렇게 표시만 한 것이다.
q:      레코딩 종료
@{a-z}: 레코딩 내용 적용(@@를 하면 바로 이전의 레코딩내용을 적용, N@@은 N으로 지정한 숫자만큼 적용)

ctags사용
쉘에서 ctags -R하여 모든 소스에 대해 인덱스 생성
vi를 실행하고 검색할 단어를 :ta tag로 지정하든지, 단어가 있는 곳에 커서를 둔다.
해당함수(오브젝트)가 정의된 곳으로 가기: Ctrl + ]
되돌아가기: Ctrl + t

여러 파일 편집
vi a.c b.c c.c와 같이 여러 파일을 지정한다.
args: 파일목록 표시
n: 다음파일 편집(vi시작지 지정하지 않는 파일은 'n 파일이름'이로 지정하면 된다.)
rew: 이전 파일 편집(vim에선 prev를 사용해도 된다)
*현재 편집중인 파일을 저장해야 다음 파일을 수정할 수 있음에 주의
(불편한 편집이 아닐 수 없다.)

여러줄을 주석으로 처리할때
10줄을 주석기호 #을 사용하여 주석처리하려면 다음과 같이 하면 된다.
우선, 첫째줄에 #를 붙이고, 두째줄로 넘어와 9.를 입력하면 된다.
.(period)는 마지막에 수행한 명령어를 반복하는 명령이다.


This article comes from dbakorea.pe.kr (Leave this line as is)

이 글은 스프링노트에서 작성되었습니다.

'It's IT > It's System(linux,win)' 카테고리의 다른 글

표준입력, 표준출력, 표준에러  (0) 2007.12.14
퍼미션, CHMODE  (0) 2007.12.14
PING  (0) 2007.12.14
LINUX 자주쓰는 명령어  (0) 2007.12.14
linux tar  (0) 2007.12.14

 

Ping은 네트워크로 연결된 두 호스트 사이에서 연결할 수 있는지 점검하는 진단도구이다. 우리가 Ping명령을 실행하면 ICMP Echo Request 패킷을 원격 IP 주소에 송신하고 ICMP 응답을 기다린다. 요즘 우리가 사용하는 ping 프로그램의 첫 버전을 만든 이는 Mike Muss이다. 그 후로 다른 많은 이들이 성능을 향상시키고, 고쳐 작성하고, 다양한 곳에 함부로 사용해왔다.

ping이라는 이름이 무엇을 뜻하는지에 대해서는 많은 의견들이 있다. 어떤 사람들은 Packet INternet Groper 라는 구문의 머릿글자를 따온 것이라 말한다. 그럴 듯 해 보이기는 하지만 맞는 말은 아니다. 사실 Ping은 소나(sonar: 수중 음파 탐지기) 추적 시스템의 소리를 흉내 내어 붙여진 이름이다.

심지어 어떤 시스템 관리자가 네트워크상의 호스트에 되풀이해서 핑을 날리고 성공할 때마다 “핑” 하는 소리가 나도록 설정한 스크립트를 만들었다는 이야기까지 있다. 그 시스템 관리자는 네트워크를 괴롭혀 온 불안정한 커넥터를 찾을 때까지 규칙적으로 그의 네트워크에 설치된 BNC 커넥터들을 점검한다 -- 소리가 멈추었을 때, 그 나쁜 놈이 걸렸다는 것을 알아냈다는 것이다.

Ping은 일반적으로 어떤 머신이 데이터를 수신하고 IP 패킷을 보낼 수 있는지 점검하는 매우 유용한 도구이다. 여러분이 호스트에 핑을 보낼 수 있다면 ftp나 http 연결도 할 수 있을 것이다. 하지만, 보안을 위해 패킷 필터링을(packet filtering) 적용하는 호스트들이 많아지면서 인터넷에서 ping은 신뢰성을 잃어간다.

많은 방화벽들이 아래에 소개한 두 가지 이유로 ICMP 패킷을 걸러내도록 규정한다.

1) 여러분의 내부 네트워크가 어떻게 생겼는지 다른 사람들이 알 필요는 없다.
2) 그리고, 모든 프로토콜이 시스템을 공격하는데 이용될 수 있다. ICMP라 해서 예외는
    아니다.

여러분의 방화벽에 ICMP를 허용하도록 결정했다면 고생길을 자청한 것이다. 이 경우 ICMP가 항상 좋은 의도로 사용된다고 가정해야 하지만, 어떻게 ICMP 기반 공격들이 없을 수 있겠는가. (예를 들어 “죽음의 핑”은 버퍼 크기를 초과하는 핑 패킷으로 공격대상의 IP 스택을 넘치게 한다 -- 때에 따라 매우 극적인 결과를 맞기도 한다). 여러분의 네트워크에서 ICMP를 허용한다면 그 틈을 타고 누군가 공격할 것은 뻔하다.

다른 목적으로 쓰기 위해 ping 명령에 특별한 기능을 추가한 도구들이 있다. 가장 일반적인 것 하나는 fping 명령이다. 이 명령은 일정한 주소 범위에 ping을 보내기 위한 명령인데 일반적으로 네트워크 스캐너로 쓰이고, 또 saint와 mon처럼 네트워크 모니터로도 쓰인다. 또 다른 변종은 외부 프로그램을 소환하지 않고 스크립트 안에서 쉽게 사용할 수 있도록 Ping 기능을 perl로 구현한 Net::Ping 모듈이다. 아래 예문에서처럼 스크립트를 사용할 수 있다:

Example 1. Using Net::Perl
 

#!/usr/bin/perl -w

use strict;
use Net::Ping;

my $host = $ARGV[0];

my $p = Net::Ping->new(“icmp”);

if ($p->ping($host)) {
     print “$host is alive.\n”;
} else {
     print “$host is not reachable.\n”;
}

 

ping at Work

Ping은 인수를 덧붙이지 않고 사용하는 것이 일반적인데 프로그램 실행을 마칠 때에는 Ctrl-c 키를 누른다. 아마 아래 예문처럼 보일 것이다:
 

[pate@cherry pate]$ ping mango
PING mango (192.168.1.1) from 192.168.1.10 : 56(84) bytes of data.
64 bytes from mango (192.168.1.1): icmp_seq=0 ttl=255 time=0.5 ms
64 bytes from mango (192.168.1.1): icmp_seq=1 ttl=255 time=0.3 ms
64 bytes from mango (192.168.1.1): icmp_seq=2 ttl=255 time=0.3 ms
64 bytes from mango (192.168.1.1): icmp_seq=3 ttl=255 time=0.3 ms
64 bytes from mango (192.168.1.1): icmp_seq=4 ttl=255 time=0.3 ms
64 bytes from mango (192.168.1.1): icmp_seq=5 ttl=255 time=0.3 ms
--- mango ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 0.3/0.3/0.5 ms
[pate@cherry pate]$

 

이 화면은 세 개의 섹션으로 나눌 수 있다. 첫 번째 섹션은, “PING”이라는 글자로 시작하는 한 줄인데 여러분의 명령에 대한 결과를 미리 보여준다. “64 bytes”라는 문자열로 시작하는 두 번 째 섹션은 응답시간을 계산해서 보여준다. 세 번 째, “--- mango ping statistics ---”이라는 줄로 시작하는 마지막 섹션에서는 결과를 요약해서 보여준다. 위 예문에서 결과가 꽤 좋은데 잃어버린 패킷도 없고 응답시간도 빠른 편이어서 결과가 좋은 모습이다.

여러분의 네트워크를 점검하는데 싱글 패킷에 의존할 필요는 없다. 싱글 패킷보다는 다섯이나 열로 짝지어진 패킷이 훨씬 좋다. 네트워크가 혼잡한 곳에서 특히 싱글 패킷보다 더 유용한 정보를 얻을 수 있다.

ping 명령에는 몇 가지 유용한 옵션들이 있다. 이 옵션들을 아래 표에 정리했다:

< 표 1. Ping 명령의 옵션들 >
 

스위치

기능

-c count

지정한 숫자만큼 패킷을 주고 받으면 프로그램을 멈춘다.

-d

소켓에 사용되는 SO_DEBUG 기능을 켠다.

-f

할 수 있는 한 가장 빠른 속도로 패킷을 보낸다. (flood)

-i wait

패킷 사이에서 대기시간에 간격을 둔다.

-I [device]

출력 인터페이스를 지정한다.

-l preload

미리 로드한 패킷을 가능한 빨리 전송한 다음 일반 모드로 돌아간다.

-n

호스트 이름을 찾지 않고 IP 주소만 보인다. (numeric)

-p pattern

pattern은 16진수이며 pad data를 지정한다.

-q

요약한 줄만 출력한다. (quiet)

-r

패킷을 보낼 때에 라우팅 테이블을 사용하지 않고, 로컬 인터페이스에만 보낸다.

-R

라우트를 기록하는 옵션을 설정한다.

-s packetsize

보낼 패킷의 데이터 바이트 크기를 설정한다.

-T tsonly

timestamp 옵션과 함께 ping을 보낸다.

-T tsandaddr

timestapm와 주소를 모은다.

-T tsprespec[host1 [host2 [host3 [host4]]]]
 열거한 홉들에서 timestamp와 주소를 모은다.

 

이런 옵션들은 몇 개를 조합해서 더 유용하게 쓸 수 있다. 이전 섹션에서 사용한 ping 명령이 실행하고 결과를 돌려주는데 몇 초 시간지연이 있다. -f 스위치를 사용하면 명령을 기다리느라 버리는 시간을 줄일 수 있다. -c 10 옵션과 -q 옵션을 조합하면 좀더 빠르고 더 읽기 쉽게 결과를 출력한다.
 

[root@cherry /root]# ping -c 10 -fq mango
PING mango (192.168.1.1) from 192.168.1.10 : 56(84) bytes of data.

--- mango ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 0.2/0.2/0.9 ms
[root@cherry /root]#

 

주의:  -f와 -l 스위치는 root만 사용할 수 있다. 이 스위치들을 잘못 사용하면 네트워크에
         심각한 혼란이 생길 수 있기 때문이다.

더 큰 패킷들을 사용할 경우 테스트하는 데 좀더 유리하다면, ping -c10 -s 1024 -qf 명령으로 더 큰 패킷들을 보낸다. 이 명령은 네트워크에서 발생한 문제가 패킷들이 잘게 쪼개지는 현상 때문에 발생한다고 생각할 때 특히 유용하다.

여러분의 패킷이 라우터를 통과하는지 알아보고 싶다면, ping -c10 -R 명령을 사용한다. 이 명령은 아래와 같은 메시지를 보여줄 것이다:
 

PING tbr.nailed.org (206.66.240.72) from 192.168.1.10 : 56(124) bytes of data.
64 bytes from bigfun.whirlycott.com (206.66.240.72): icmp_seq=0 ttl=239 time=217.2 ms
RR: 192.168.1.10
216.41.39.90
serial0.mmgw32.bos1.Level3.net (209.244.39.25)
208.218.130.22
166.90.184.2
so-6-0-0.mp2.NewYork1.level3.net (209.247.10.45)
137.39.52.10
180.ATM7-0.BR2.NYC9.ALTER.NET (152.63.22.229)
lo0.XR2.NYC9.ALTER.NET (137.39.4.175)

64 bytes from bigfun.whirlycott.com (206.66.240.72): icmp_seq=1 ttl=239 time=1940.8 ms (same route)
64 bytes from bigfun.whirlycott.com (206.66.240.72): icmp_seq=2 ttl=239 time=250.6 ms (same route)
64 bytes from bigfun.whirlycott.com (206.66.240.72): icmp_seq=3 ttl=239 time=230.3 ms (same route)
64 bytes from bigfun.whirlycott.com (206.66.240.72): icmp_seq=4 ttl=239 time=289.8 ms (same route)
64 bytes from bigfun.whirlycott.com (206.66.240.72): icmp_seq=5 ttl=239 time=1261.4 ms (same route)
64 bytes from bigfun.whirlycott.com (206.66.240.72): icmp_seq=6 ttl=239 time=469.4 ms (same route)
64 bytes from bigfun.whirlycott.com (206.66.240.72): icmp_seq=7 ttl=239 time=1272.3 ms (same route)
64 bytes from bigfun.whirlycott.com (206.66.240.72): icmp_seq=8 ttl=239 time=353.1 ms (same route)
64 bytes from bigfun.whirlycott.com (206.66.240.72): icmp_seq=9 ttl=239 time=1281.1 ms (same route)

--- tbr.nailed.org ping statistics ---
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 217.2/756.6/1940.8 ms

 

주의:  -R 스위치로 설정하는 라우트 기록 옵션은 모든 라우터와 호스트에서 환대받는 것은
         아니다. 패킷들이 네트워크를 다니는 경로를 확인하는 데 traceroute가 훨씬 좋은
         도구일 것이다.

ping 명령은 여러분 네트워크의 문제해결에 매우 유용한 도구이고, 대충 아무렇게나 사용해서는 안된다.

이 기사는 Pat Eyler와 New Riders Press가 저작권을 소유한다. 원문을 수정하거나 보태어서는 안되며, 열린 출판물 라이선스(Open Publication License)에 따라 배포된다. 이 글은 “A Practical Guide to TCP/IP”라는 이름으로 New Riders 출판에서 겨울에 출간할 리눅스 네트워킹 책에 포함될 섹션의 초고이다:

이 글은 스프링노트에서 작성되었습니다.

'It's IT > It's System(linux,win)' 카테고리의 다른 글

퍼미션, CHMODE  (0) 2007.12.14
VI명령어  (0) 2007.12.14
LINUX 자주쓰는 명령어  (0) 2007.12.14
linux tar  (0) 2007.12.14
리눅스 libc 패키지 (The Linux libc Package)  (0) 2007.12.13

 


공사중에 로그인 막기
시스템을 공사중일 때, root 이외의 다른 사용자를 로그인 못하게 해야 할 때가 있죠?
그럴 때는, /etc/nologin 이라는 파일을 만들어,
공사중 또는 Under Construction이라는 공지를 넣으면 됩니다.

크기가 가장 큰 파일, 디렉토리 찾기
가장 큰 디렉토리를 찾으려면,
du -S | sort -n

cf) 솔라리스의 경우
du -sk `ls -1 | grep '/$'`|sort +n

가장 큰 파일을 찾으려면,
ls -lR | sort +4n

디스크 Full발생시 쓸모없는 파일 제거
오브젝트파일만 제거하는 예제
find . -name '*.o' -print -exec rm -f {} \;

실행파일들 출력
find . -type f -perm +u+x -print

find의 일반적인 용례
name 파일명 지정한 파일명에 해당하는 파일을 검색
메타문자를 사용할 경우 파일명을 ''기호 내에 기입

-size  파일 크기 지정된 크기의 파일을 검색. 크기는 블록 단위, 1 블록 = 512 바이트
-mtime 숫자 지정된 날짜 이전에 수정된 파일을 검색
-ctime 숫자 가장 최근에 변경된 것이 지정된 날짜 전인 파일 검색
-user  사용자명 지정된 사용자 수용의 파일 검색
-print 검색 결과를 화면에 표시
-atime 숫자 지정된 날짜 이전에 접근 된 파일을 검색
-perm  접근권한 지정

-type 파일 유형 지정된 유형의 파일을 검색
b: 블록 특수 파일
c: 문자 특수 파일
d: 디렉토리
f: 일반파일
l: 링크파일
p: 파이프 파일

-exec 명령어 {} \;
실행 결과를 입력 파일로 받아들여 명령어 실행.
명령어의 끝은 \;
{} : 현재 경로명으로 대치

현재 디렉토리의 크기만을 파악할때
[root@dev2 local]# du -c -h --max-depth=0 *
6.4M    apache
35M     bin
43M     dns
1.7M    doc
42k     etc
1.0k    games
42k     geektalkd
1.1M    gnuws
1.1M    include
41k     info
19M     jakarta-tomcat-3.2.3
0       jre
15M     jre118_v3
25M     lib
62k     libexec
1011k   man
1.3M    mm.mysql.jdbc-1.2c
937k    sbin
3.8M    share
1.8M    shoutcast-1-8-3-linux-glibc6
5.2M    ssl
159M    total

시스템 정보 감추기
/etc/inetd.conf 파일을 열어서,
telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd -h


어떤 프로세스가 메모리를 가장 많이 잡아먹고 있는지 알아내기
ps -aux | sort +4n
또는
ps -aux | sort +5n

FTP로 들어온 사용자 확인하기
ftpwho
ftpcount


원하지 않는 사용자 죽이기
[root@dream /root]# skill -KILL sunny
위의 명령을 내리면 sunny 라는 사용자를 완전히 추방시킬수 있습니다.
그런데 이렇게 완전히 추방시키는게 아니구, 특정 터미널에 접속해있는 사용자만 추방시켜야 할 때도 있겠죠?
그럴때는

[root@dream /root]# skill -KILL -v pts/14
이런식으로 하면 된다 그럼 pts/14 에 연결되어 있는 사용자가 죽게 됩니다.

less 결과를 vi로 보기
less상태에서 v를 누르면 바로 vi로 감


vi에서 블럭 설정하기
alt+v 하면, 라인 단위로 블럭 설정을 할 수 있으며, 해제 하시려면 Esc를 누르면 됩니다.

또한 ctl+v를 하시면, 블럭 단위로 블럭을 설정하실 수 있습니다.

블럭을 설정 하신 뒤,

삭제를 하려면 x
복사를 하려면 y
붙여넣기는 p

man 페이지 프린트하기
vi에 대한 매뉴얼을 ps(postscript파일)로 저장
man -t vi > vi.ps

man 페이지를 일반파일로 갈무리하려면 man vi | col -b > aa.txt

ping 무시하기
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all

동시에 여러개의 하위 디렉토리 만들기
mkdir -p music/koreanmusic/ost

리로 다시 살리기
boot : vmlinuz root=/dev/hda6

특정 사용자 ftp 접근 막기
/etc/ftpusers 파일에 로그인 네임을 추가하면 됩니다.

X 윈도우에서 TV보기
리눅스에서 TV보기 위해서는 드라이버 파일과 TV를 보는 프로그램이 필요합니다.
이 글에서는 미지 리눅스 OS에 탑재된 bttv 칩셋을 사용하는 TV 카드를 기준으로 설명합 니다.
만일 커널을 새로 컴파일 하실 분은 반드시 Character devices -> Video For Linux -> BT848 Video For Linux 항목을 모듈화 시키거나 커널에 포함하십시오.

TV 카드를 리눅스에 인식시키기 위해서 /etc/conf.modules 파일에 다음과 같은 내용을 삽입하고 컴퓨터를 다시 시작합니다.

alias char-major-81 bttv

# 필립스 튜너의 경우 pre-install bttv modprobe -k tuner

# 알프스 튜너의 경우 pre-install bttv modprobe -k tuner type=9

이제 kwintv나 xawtv 등의 TV 시청 프로그램으로 TV를 볼 수 있습니다.
만약 TV 장치를 찾지 못하는 오류가 있다면 bttv driver 디렉토리에 포함된 MAKEDEV 를 실행하십시오.

ls라는 파일이 포함된 rpm패키지 찾기
일단 ls의 절대경로를 알아야 한다. which ls
which로 알아낸 ls의 절대경로로 rpm질의를 한다.rpm -qf /bin/ls
[root@piruks /etc]# which ls
/bin/ls
[root@piruks /etc]# rpm -qf /bin/ls
fileutils-4.0i-2mz

현재 rpm패키지의 의존패키지
rpm -qR 패키지명

현재 디렉토리크기
du -h --max-depth=1 .

바로 이전 디렉토리로 가기
cd -

프로세스명으로 프로세스 죽이기
[리눅스]
killall 프로세스명
kill -9 `pidof 프로세스명`

하드웨어 시계맞추기
배포본을 설치하고 나면 시간이 맞지 않는 경우가 많다.
간단히 어느정도 정확한 시간을 설정하는 방법이다.
[root@dev /down]# rdate -s time.kriss.re.kr
[root@dev /down]# clock -w

원격에서 리모트서버의 X application실행시
X윈도 app를 실행할때 다음과 같은 에러가 나면 조치
[kang@dev /home/kang] xclock
Xlib: connection to "211.222.186.170:0.0" refused by server
Xlib: Client is not authorized to connect to Server
Error: Can't open display: 211.222.186.170:0.0

export DISPLAY=211.222.186.170:0
xhost +211.222.186.170

파일내 문자열 치환
mysql에 replace라는 프로그램이 딸려있다.

현재 디렉토리내 모든 파일에서 a를 b로 변경
replace a b -- *

현재 디렉토리내 모든 파일에서 a는 b로, b는 a로 변경
replace a b b a -- *

하위 디렉토리를 포함하여 위의 작업을 할때
replace a b -- `find . -type f -name '*' -print`
or
find . -type f -name '*' -exec replace a b -- {} \;

PERL로 한다면 다음과 같이 해도 된다.
find . -type f -name '*' -exec perl -pi -e 's/a/b/g' {} \;

ex)
find . -type f -name '*.html' -exec /usr/local/mysql/bin/replace myunggyu@orgio.net kang@dbakorea.pe.kr -- {} \;

ISO이미지 만들기
/down/Disk1 디렉토리의 내용을 Linux9i_1.iso라는 ISO이미지파일로 만든다.
mkisofs -r -o Linux9i_1.iso /down/Disk3

위에서 만들어진 Linux9i_1.iso파일을 레코더로 구울때
cdrecord -v -isosize speed=12 dev=0,0 Linux9i_1.iso

XMMS에서 한글출력
메뉴중 옵션-선택사항-폰트'에 다음과 같이 지정
옵션: 폰트셋 사용하기(멀티바이트 지원설정) 체크
연주목록에 다음과 같이 설정
-adobe-helvetica-bold-r-*-*-10-*, -baekmuk-gulimbdf-medium-r-normal-*-*-120-*-*-m-*-ksc5601.1987-0

기본창- X폰트사용 체크 하고 다음과 같이 설정
-adobe-helvetica-medium-r-*-*-8-*, -baekmuk-gulimbdf-medium-r-normal-*-*-120-*-*-m-*-ksc5601.1987-0

ISO파일 처리
CD이미지(ISO 9660) 만들기
dd if=/dev/cdrom of=ora817.iso
or
mkisofs -R -V Oracle817 -o ora817.iso /dev/cdrom
  
CD이미지(ISO 9660) 마운트
mount -r -t iso9660 -o loop ora817.iso /mnt/iso

CD이미지(ISO 9660) 굽기
cdrecord -scanbus로 가능한 dev파악
cdrecord -v -eject speed=12 dev=0,0,0 ora817.iso


file: 파일의 종류와 정보를 알려준다.

[kang@ns work]$ file signal_reset.c
signal_reset.c: C program text

[kang@ns work]$ file signal_reset
signal_reset: ELF 32-bit LSB executable, Intel 80386, version 1, dynamically linked (uses shared libs), not stripped


stat: Unix system함수인 stat(fstat)가 가지는 정보를 보여주기 위해 명령어로 구현되어진 것

[kang@ns work]$ stat signal_reset.c
File: "signal_reset.c"
Size: 175 Filetype: Regular File
Mode: (0664/-rw-rw-r--) Uid: ( 512/ kang) Gid: ( 512/ kang)
Device: 3,7 Inode: 96199 Links: 1
Access: Wed Oct 18 21:12:01 2000(00000.00:01:33)
Modify: Wed Oct 18 21:11:43 2000(00000.00:01:51)
Change: Wed Oct 18 21:11:43 2000(00000.00:01:51)

[kang@ns work]$ stat signal_reset
File: "signal_reset"
Size: 11991 Filetype: Regular File
Mode: (0775/-rwxrwxr-x) Uid: ( 512/ kang) Gid: ( 512/ kang)
Device: 3,7 Inode: 96198 Links: 1
Access: Wed Oct 18 21:12:06 2000(00000.00:01:30)
Modify: Wed Oct 18 21:11:50 2000(00000.00:01:46)
Change: Wed Oct 18 21:11:50 2000(00000.00:01:46)


reset: 키보드설정 reset(? 매뉴얼에도 없다. 잘모르겠다.)

[kang@ns work]$ reset
Erase is delete.
Kill is control-U (^U).
Interrupt is control-C (^C).

whatis : whatis데이터베이스에서 완전한 단어를 검색한다.
ex) whatis ls whereis

apropos : whatis데이터베이스에서 문자열을 검색한다. man -k와 같다.
ex) apropos socket

whereis : 바이너리,소스,매뉴얼 파일의 위치 출력
ex) whereis cp

cal : 달력 출력
ex) cal 2004   : 2004년 달력 출력
     cal 5 2004 : 2004년 5월 달력 출력
    
tty : 자신이 사용하는 터미널명을 출력. kill명령으로 해당 터미널유저를 처리할때 쓰도록..




쉘에서...

?은 한문자를 의미
*은 모든 문자를 의미

ls dbakorea[0-9] : dbakorea0 ~ dbakorea9
ls dbakorea[09]  : dbakorea0, dbakorea9


SORT
[kang@dbakorea test]$ cat sort.dat
aaa,강명규,관리자
ccc,홍길동,도둑놈
bbb,강감찬,장군
ddd,임꺽정,도적놈
[kang@dbakorea test]$ sort sort.dat
aaa,강명규,관리자
bbb,강감찬,장군
ccc,홍길동,도둑놈
ddd,임꺽정,도적놈
[kang@dbakorea test]$ sort -t , +1 sort.dat 2번째 컬럼을 기준으로 정렬. -t는 필드구분자로 콤마 지정
bbb,강감찬,장군
aaa,강명규,관리자
ddd,임꺽정,도적놈
ccc,홍길동,도둑놈

대소문자 변환
[kang@dbakorea test]$ tr "[a-z]" "[A-Z]" < sort.dat
AAA,강명규,관리자
CCC,홍길동,도둑놈
BBB,강감찬,장군
DDD,임꺽정,도적놈

PASTE
[kang@dbakorea test]$ cat > paste.data1
홍길동
이순신
김유신
[kang@dbakorea test]$ cat > paste.data2
부산
서울
대구
[kang@dbakorea test]$ paste paste.data1 paste.data2
홍길동  부산
이순신  서울
김유신  대구
[kang@dbakorea test]$ paste -d"\n" paste.data1 paste.data2
홍길동
부산
이순신
서울
김유신
대구
[kang@dbakorea test]$ paste -s -d"::\n" paste.data1
홍길동:이순신:김유신
[kang@dbakorea test]$

JOIN : DBMS의 조인기능과 유사
[kang@dbakorea test]$ cat > join.data1
maddog:강명규
gildong:홍길동
superman:슈퍼맨
batman:배트맨
[kang@dbakorea test]$ cat > join.data2
maddog:DBA    
maddog:Programmer
superman:Hero
batman:American Hero
[kang@dbakorea test]$ join -j1 1 -j2 1 -t: join.data1 join.data2
maddog:강명규:DBA
maddog:강명규:Programmer
superman:슈퍼맨:Hero
[kang@dbakorea test]$


SPLIT
[kang@dbakorea test]$ split -100000 wf_cleaner_20040418.log wf_cleaner_            
[kang@dbakorea test]$ ls -l
총 322816
-rw-r--r--   1 sky      other    82509153  4월 21일  16:15 wf_cleaner_20040418.log
-rw-r--r--   1 sky      other    4817168  4월 21일  16:16 wf_cleaner_aa
-rw-r--r--   1 sky      other    4826953  4월 21일  16:16 wf_cleaner_ab
-rw-r--r--   1 sky      other    4819016  4월 21일  16:16 wf_cleaner_ac
-rw-r--r--   1 sky      other    4818664  4월 21일  16:16 wf_cleaner_ad
-rw-r--r--   1 sky      other    4815234  4월 21일  16:16 wf_cleaner_ae
-rw-r--r--   1 sky      other    4826339  4월 21일  16:16 wf_cleaner_af
-rw-r--r--   1 sky      other    4822263  4월 21일  16:16 wf_cleaner_ag
-rw-r--r--   1 sky      other    4814657  4월 21일  16:16 wf_cleaner_ah
-rw-r--r--   1 sky      other    4816299  4월 21일  16:16 wf_cleaner_ai
-rw-r--r--   1 sky      other    4817442  4월 21일  16:16 wf_cleaner_aj
-rw-r--r--   1 sky      other    4807225  4월 21일  16:16 wf_cleaner_ak
-rw-r--r--   1 sky      other    4816881  4월 21일  16:16 wf_cleaner_al
-rw-r--r--   1 sky      other    4805557  4월 21일  16:16 wf_cleaner_am
-rw-r--r--   1 sky      other    4824945  4월 21일  16:16 wf_cleaner_an
-rw-r--r--   1 sky      other    4800172  4월 21일  16:16 wf_cleaner_ao
-rw-r--r--   1 sky      other    4813110  4월 21일  16:16 wf_cleaner_ap
-rw-r--r--   1 sky      other    4795892  4월 21일  16:16 wf_cleaner_aq
-rw-r--r--   1 sky      other     651336  4월 21일  16:16 wf_cleaner_ar
[kang@dbakorea test]$ cat wf_cleaner_a[a-r] > wf_cleaner_orig
[kang@dbakorea test]$

CUT : 컬럼단위 필터링 cf) grep은 행단위 필터링
필드,문자단위로 컬럼 출력
[kang@dbakorea test]$ cat sort.data
aaa,강명규,관리자
ccc,홍길동,도둑놈
bbb,강감찬,장군
ddd,임꺽정,도적놈
[kang@dbakorea test]$ cut -f1,3 -d , sort.data 1,3번째 필드만 출력. 필드구분자는 콤마
aaa,관리자
ccc,도둑놈
bbb,장군
ddd,도적놈
[kang@dbakorea test]$ cut -c5-7 sort.data  5~7컬럼값 출력
강명규
홍길동
강감찬
임꺽정


EGREP
grep과 달리 Regular Expression을 지원한다.

b                        : 일치되는 행의 블록 번호 출력                  
c           : 문자열을 포함하는 행수 출력                    
h           : 파일 이름을 출력하지 않음                      
i           : 대소문자를 구별하지 않음                      
l           : 문자열을 포함하는 파일 이름만 출력            
n           : 일치되는 행번호를 함께 출력                    
s           : 오류가 발생할 경우에만 메시지 출력            
v           : 일치되지 않는 행만 출력                        
w           : 문자열이 하나의 단어인 경우만 검색(grep만 가능)
e 표현식    : 정규 표현식이 - 문자로 시작할 때 유용          
e 문자열    : fgrep에서만 사용, 문자열은 단순 문자열을 의미  
f 파일명    : 검색문자열을 파일명으로 부터 받아들임          

^  : 행의 시작
$  : 행의 끝
.  : 임의의 한문자
[] : []속에 표현되는 문자 중 임의의 한 문자
*  : * 앞의 정규표현식이 0회 이상 나타남
+  : + 앞의 정규표현식이 1회 이상 나타남(egrep에서만 가능)
?  : ? 앞의 정규표현식이 0 또는 1회 나타남(egrep에서만 가능)
\  : 메타문자의 의미 제거(예 : '\*'는 *문자를 의미)
|  : 문자열간의 OR연산자(egrep에서만 가능)
() : 정규 표현식을 둘러 쌈(egrep에서만 가능)

[kang@dbakorea test]$ cat sort.data
aaa,강명규,관리자
ccc,홍길동,도둑놈
bbb,강감찬,장군
ddd,임꺽정,도적놈
[kang@dbakorea test]$ egrep '강명규|강감찬' sort.data
aaa,강명규,관리자
bbb,강감찬,장군

This article comes from dbakorea.pe.kr (Leave this line as is)

이 글은 스프링노트에서 작성되었습니다.

'It's IT > It's System(linux,win)' 카테고리의 다른 글

VI명령어  (0) 2007.12.14
PING  (0) 2007.12.14
linux tar  (0) 2007.12.14
리눅스 libc 패키지 (The Linux libc Package)  (0) 2007.12.13
리눅스 디렉토리  (0) 2007.08.17

 

tar

여러개의 파일을 하나로 묶는 명령어이다.
압축명령어라고 잘못알고 계시는 분들이 있는데, tar는 분명 여러개의 파일을 하나로 묶어주는 일종의 유틸리티라고 할 수 있다.
하지만, 거의 대부분 tar는 gzip이나 compress등과 같은 압축유틸리티와 함께 사용을 하는 것이 일반적이다.

또한 tar옵션에는 z라는 옵션이 있기 때문에 tar명령어만으로 압축하고 풀 수 있기때문에 tar만으로도 효율적인 파일관리를 할 수있다.


사용형식

 파일묶기       : tar cvf 파일명.tar 파일(디렉토리)
 묶은컥瞿릴?  : tar cvf 파일명.tar
 파일풀기       : tar xvf 파일명.tar

 묶고압축하기     : tar cvfz 파일명.tar.gz 파일(디렉토리)
 묶고압축된 파일 보기 : tar tvfz 파일명.tar.gz 
 묶고압축된파일 풀기 : tar xvfz 파일명.tar.gz

이 글은 스프링노트에서 작성되었습니다.

'It's IT > It's System(linux,win)' 카테고리의 다른 글

VI명령어  (0) 2007.12.14
PING  (0) 2007.12.14
LINUX 자주쓰는 명령어  (0) 2007.12.14
리눅스 libc 패키지 (The Linux libc Package)  (0) 2007.12.13
리눅스 디렉토리  (0) 2007.08.17
[2007 IT히트상품] 인체공학 디자인 매력 한달만에 25만대 판매
휴대폰 팬택계열 '돌핀슬라이드'
 



팬택계열(부회장 박병엽)이 지난 10월 중순 출시한 스카이 `돌핀슬라이드'(IM-U220, IM-U220K)는 출시 한 달여 만에 약 25만대(11월말 기준)가 판매되며 3G 시장에서 `돌풍'을 일으키고 있다. 일 개통량이 3000∼4000대 육박하는 판매실적을 기록하며 하반기부터 본격화된 3G폰 전쟁에서 선봉장 역할을 톡톡히 하고 있다.

돌핀슬라이드는 평평한 슬라이드폰에 5.8도의 각도를 더해, 살아 숨쉬며 힘차게 뛰어오르는 돌고래의 모양을 구현한 3G폰이다. 애칭도 돌고래 디자인을 따라 `돌핀' 슬라이드로 붙여졌다. `3G' `영상통화' 등 자칫 차갑게 느껴질 수 있는 첨단 IT제품에 사랑스러운 디자인과 정이 가는 애칭을 더한 것이 성공 요인 중 하나다.

또 손에 쥐었을 때 착 감기는 뛰어난 `손맛'과 슬라이드가 올라가면 뺨에 밀착되는 인체공학적 디자인이 사용편의성을 높여 사랑을 받고 있다.


여기에 2대의 양철 로봇이 서로에게 다가가지만 직선으로 만들어져 안아 주지 못하는 안타까운 상황을 담은 돌핀슬라이드 `로봇편' 광고가 소비자들의 많은 사랑을 받으며 판매진작에 크게 기여하고 있다. `곡선'이라는 제품의 특징을 `따뜻하게 감싸 안아 주는 스킨십'으로 재해석한 것이다



출처 : http://www.dt.co.kr/contents.html?article_no=2007121402014531686002

'It's IT > It's mobile' 카테고리의 다른 글

Mobile Network Code  (0) 2007.12.07
구글 안드로이드 SDK  (0) 2007.11.14
WINC와 Callback URL SMS 개념잡기  (0) 2007.08.17
이동통신 주요 시스템 개념  (0) 2007.08.17
HLR(Home Location Register)  (0) 2007.08.17


libc: ISO 8859.1, , YP 함수들, crypt 함수들, 기본적인 Shadow 루틴들 (기본적으로는 포함되지 않음), ... libcompat에 있는 호환성을 위한 기존의 루틴들 (기본적으로 수행되지 않음),영어,불어 또는 독어 에러 메세지들, libcourses에 있는 bsd 4.4 lite와 호환성 있는 화면 핸들링 루틴들, libbsd에 있는 bsd와 호환되는 루틴들, libtermcap에 있는 화면 핸들링 루틴들, libdbm에 있는 데이타베이스 관리 루틴들, libm에 있는 수학계산 루틴들, crt0.o???에 있는 프로그램 실행을 위한 항목, libieee???에 있는 바이트 sex 정보 (우스운 ???를 대신할 정보를 보내주세요.), libgmon에 있는 사용자 공간 프로파일링(Profiling). 리눅스 libc 개발자들 중 누군가가 이 장을 써 주기를 바랍니다. 지금 내가 말할 수 있는 것은 실행할 수 있는 형태인 a.out이 공유 라이브러리 만들기의 변화를 의미하는 elf(executable and linkable format)으로 바뀔 것이라는 것뿐이다. 현재는 두 형태(a.out과 elf)가 모두 지원된다.

'It's IT > It's System(linux,win)' 카테고리의 다른 글

VI명령어  (0) 2007.12.14
PING  (0) 2007.12.14
LINUX 자주쓰는 명령어  (0) 2007.12.14
linux tar  (0) 2007.12.14
리눅스 디렉토리  (0) 2007.08.17

 

Mobile Network Code

From Wikipedia, the free encyclopedia

Jump to: navigation, search

A mobile network code (MNC) is used in combination with a Mobile country code (MCC) (also known as a "MCC / MNC tuple") to uniquely identify a mobile phone operator/carrier using the GSM and UMTS mobile networks.

The following table contains the complete list of known mobile phone operators. Country information is provided for completeness, though this information is best obtained from the Mobile country code page.

Mobile Country / Network Codes
MCC MNC Operator Country Operational Status Frequencies (MHz)
412 01 Afghan Wireless Communication Company Afghanistan Operational 900 / 1800
412 20 Roshan Afghanistan Operational 900
276 01 Albanian Mobile Communications Albania Operational Unknown
276 02 Vodafone Albania Albania Operational Unknown
603 01 Algeria Mobile Network Algeria Operational Unknown
603 02 Orascom Algeria Operational 900 / 1800
603 03 Nedjma Algeria Operational 900 / 1800
213 03 STA-MobilAnd Andorra Operational 900
631 02 Unitel Angola Operational 900
344 03 APUA Antigua & Barbuda Operational 1900
722 07 Unifon Argentine Republic Operational Unknown
722 34 Telecom Personal Argentine Republic Operational 1900
283 01 ArmenTel Armenia Operational 900
363 01 Setar Aruba Operational 900 / 1800 / 1900
505 01 Telstra Australia Operational 900 / 1800
505 02 Cable + Wireless / Optus Telecom Australia Operational Unknown
505 03 Vodafone Australia Operational 900
232 01 Mobilkom Austria Austria Operational 900
232 03 max.mobil.Telekoms Service / T-Mobile Austria Austria Operational 900 / 1800
232 05 Connect Austria One Austria Operational 1800
232 07 *Telering Austria Operational 1800
232 10 3 (UMTS) Austria Operational Unknown
400 01 Azercell Telekom B.M. Azerbaidjan Operational 900
400 02 J.V. Bakcell GSM 2000 Azerbaidjan Operational 900
426 01 Batelco Bahrain Operational Unknown
426 02 MTC-VFBH Bahrain Operational Unknown
470 01 Grameen Phone Ltd Bangladesh Operational Unknown
470 02 TM International (Aktel) Bangladesh Operational Unknown
470 03 Sheeba Telecom (Banglalink) Bangladesh Operational Unknown
257 01 Velcom Belarus Operational Unknown
257 02 MTS BY Belarus Operational Unknown
257 04 BeST Belarus Operational Unknown
206 01 Belgacom Mobile Proximus Belgium Operational Unknown
206 10 Mobistar Belgium Operational Unknown
206 20 KPN Orange Belgium Operational Unknown
218 01 Cronet Bosnia and Herzegovina Operational Unknown
218 19 PTT Bosnia Bosnia and Herzegovina Operational Unknown
218 90 PE PTT BIH Bosnia and Herzegovina Operational Unknown
652 01 Mascom Wireless Botswana Operational Unknown
724 02 TIM Brazil Operational Unknown
724 03 TIM Brazil Operational Unknown
724 04 TIM Brazil Operational Unknown
724 05 CLARO Brazil Operational Unknown
724 31 Oi Brazil Operational Unknown
528 01 Jabatan Telekom Brunei Darussalam Operational Unknown
528 11 DST Communications Brunei Darussalam Operational Unknown
284 01 MobilTel AD Bulgaria Operational Unknown
284 05 Globul Bulgaria Operational Unknown
613   OnaTel Burkina Faso Operational Unknown
456 01 CamGSM Cambodia Operational Unknown
456 02 Cambodia Samart Comms Cambodia Operational Unknown
456   Cambodia Shinawatra Cambodia Operational Unknown
624 01 PTT Cameroon Cellnet Cameroon Operational Unknown
302 37 Microcell Connexions Inc Canada Operational Unknown
302 720 Rogers Canada Operational Unknown
625 01 Cabo Verde Telecom Cape Verde Operational Unknown
730 01 Entel Telefonia Movil Chile Operational Unknown
730 02 Movistar Chile Chile Operational Unknown
730 03 Claro Chile Chile Operational Unknown
730 10 Entel PCS Telecom. Chile Operational Unknown
460 00 Guangdong MCC / CMCC / NVyR / China Telecom GSM China Operational Unknown
460 01 China Unicom GSM China Operational Unknown
460 02 Liaoning PPTA China Operational Unknown
460   Beijing Wireless China Operational Unknown
460   Zhuhai Comms China Operational Unknown
460   DGT MPT China Operational Unknown
460   Jiaxing PTT China Operational Unknown
460   Tjianjin Toll China Operational Unknown
629   African Telecoms Congo Operational Unknown
629   Congolaise Wireless Congo Operational Unknown
219 01 Croatian Telecoms Cronet / HTmobile H Croatia Operational Unknown
219 10 Vipnet Croatia Operational Unknown
368 01 Cubacel Cuba Operational Unknown
280 01 Cyprus Telecoms Authority Cyprus Operational Unknown
280 10 areeba Cyprus Operational Unknown
230 01 T-Mobile Czech Republic Czech Republic Operational Unknown
230 02 Telefonica O2 Czech Republic Czech Republic Operational Unknown
230 03 Vodafone Czech Republic Czech Republic Operational Unknown
238 01 TDC / Tele-Danmark Mobil Denmark Operational Unknown
238 02 Sonofon Denmark Operational Unknown
238 06 3 / Hutchsion 3G (UMTS) Denmark Operational Unknown
238 20 Telia Denmark Operational Unknown
238 30 Orange / Mobilix Denmark Operational Unknown
602 01 MobiNil Egypt Operational Unknown
602 02 Misrfone Telecom. Click GSM / Vodafone Egypt Operational Unknown
248 01 Estonian Mobile Telecom Estonia Operational Unknown
248 02 Radiolinja Eesti Estonia Operational Unknown
248 03 Tele 2 / Q GSM Estonia Operational Unknown
636 01 Etheopian Telecoms Auth. Ethiopia Operational Unknown
288   Faroese Telecom Faroe Islands Operational Unknown
542 01 Vodafone Fiji Operational Unknown
244 03 Telia Finland Operational Unknown
244 05 Elisa / Radiolinja / Alands Mobiltelefon Finland Operational Unknown
244 09 Finnet Group / Lnnen Puhelin / Helsingin Puhelin Finland Operational Unknown
244 12 FinNet Finland Operational Unknown
244 91 Sonera Corporation Finland Operational Unknown
208 01 Orange / France Telecom Itineris France Operational Unknown
208 10 SFR France Operational Unknown
208 20 Bouygues Telecom France Operational Unknown
547 20 Tikiphone French Polynesia (France) Operational Unknown
340 01 France Caraibe Ameris French West Indies (France) Operational Unknown
282 01 Geocell Limited Georgia Operational Unknown
282 02 Magticom GSM Georgia Operational Unknown
282   Superphone Georgia Operational Unknown
262 01 D1 - DeTe Mobil / T-Mobile Germany Operational Unknown
262 02 D2 - Mannesmann Mobilfunk / Vodafone D2 Germany Operational Unknown
262 03 E-Plus Germany Operational Unknown
262 07 O2 Germany Operational Unknown
620 01 ScanCom Ghana Operational Unknown
620   Franci Walker Ltd Ghana Operational Unknown
266 01 Gibraltar Telecoms GibTel Gibraltar Operational Unknown
704 01 SERCOM / Telgua / Claro Guatemala Operational Unknown
704 02 Comcel / Tigo Guatemala Operational Unknown
704 03 Telefonica / Movistar Guatemala Operational Unknown
202 01 Cosmote Greece Operational Unknown
202 05 Vodafone Greece Operational Unknown
202 09 Q-telecom Greece Operational Unknown
202 10 STET / TIM Greece Operational Unknown
290 01 Tele Greenland Greenland Operational Unknown
340 01 F Orange Guadeloupe (France) Operational Unknown
611 02 Sotelgui Lagui Guinea Operational Unknown
611   Int'l Wireless Guinea Operational Unknown
611   Spacetel Guinea Operational Unknown
454 00 Hong Kong Telecom CSL Hong Kong Operational Unknown
454 04 Hutchison Telecom / Orange Hong Kong Operational Unknown
454 06 SmarTone Mobile Comms Hong Kong Operational Unknown
454 10 New World PCS Hong Kong Operational Unknown
454 12 Peoples Telephone Hong Kong Operational Unknown
454 16 Mandarin Comm / Sunday Hong Kong Operational Unknown
454 18 Pacific Link Hong Kong Operational Unknown
454 22 P Plus Comm / SMC PCS Hong Kong Operational Unknown
216 01 Pannon Hungary Operational Unknown
216 30 T-Mobile Hungary Operational Unknown
216 70 Vodafone HU Hungary Operational Unknown
274 01 Iceland Telecom Siminn Iceland Operational Unknown
274 02 TAL hf / Og Vodafon Iceland Operational Unknown
404 02 AirTel India Operational Unknown
404 03 INA Airtel India Operational Unknown
404 04 IDEA India Operational Unknown
404 05 Hutch India Operational Unknown
404 07 TATA Cellular India Operational Unknown
404 10 Bharti Cellular Telecom Airtel India Operational Unknown
404 11 Essar / Sterling Cellular India Operational Unknown
404 12 Escotel Mobile Comms India Operational Unknown
404 13 Hutch India Operational Unknown
404 14 Modi Telstra Modicom India Operational Unknown
404 15 Aircel Digilink Essar Cellph. India Operational Unknown
404 20 Hutchison Maxtouch / Orange India Operational Unknown
404 21 BPL Mobile India Operational Unknown
404 22 Idea India Operational Unknown
404 27 BPL USWest Cellular / Cellular Comms India Operational Unknown
404 30 Usha Martin Tel. Command India Operational Unknown
404 31 AirTel / Mobilenet India Operational Unknown
404 40 AirTel / SkyCell Communications India Operational Unknown
404 41 RPG MAA India Operational Unknown
404 42 Srinivas Cellcom India Operational Unknown
404 45 AirTel India Operational Unknown
404 49 IND AIRTEL India Operational Unknown
404 53 BSNL MOBIL India Operational Unknown
404 55 BSNL MOBIL India Operational Unknown
404 62 BSNL MOBIL India Operational Unknown
404 69 DOLPHIN India Operational Unknown
404 70 AirTel India Operational Unknown
404 75 CellOne India Operational Unknown
404 86 Hutch India Operational Unknown
404   Mobile Telecom India Operational Unknown
404   Airtouch India Operational Unknown
404   BPL USWest India Operational Unknown
404   Koshika India Operational Unknown
404   Bharti Telenet India Operational Unknown
404   Birla Comm India Operational Unknown
404   JT Mobiles India Operational Unknown
404   Evergrowth Telecom India Operational Unknown
404   Hexacom India India Operational Unknown
404   Reliance Telecom India Operational Unknown
404   Fascel Limited India Operational Unknown
404 90 AirTel India Operational Unknown
404 92 AirTel India Operational Unknown
404 93 AirTel India Operational Unknown
404 95 AirTel India Operational Unknown
404 96 AirTel India Operational Unknown
404 97 AirTel India Operational Unknown
404 98 AirTel India Operational Unknown
510 01 PT Satelindo / PT Satelit Palapa / INDOSAT Indonesia Operational Unknown
510 10 Telkomsel Indonesia Operational Unknown
510 11 PT Excelcomindo Excelcom / proXL Indonesia Operational Unknown
510 21 IND IM3 / INDOSAT Indonesia Operational Unknown
432 11 T.C.I. Iran Operational Unknown
432   Celcom Iran Operational Unknown
432   Kish Free Zone Iran Operational Unknown
418 01 Iraq Telecom Iraq Operational Unknown
272 01 Eircell / Vodafone Ireland Operational Unknown
272 02 Esat Digifone / O2 Ireland Operational Unknown
272 03 Meteor Ireland Operational Unknown
425 01 Partner Communications / Orange Israel Operational Unknown
425 02 Cellcom Israel Operational Unknown
222 01 Telecom Italia Mobile Italy Operational Unknown
222 10 Vodafone Italy Operational Unknown
222 88 Wind Telecomunicazioni Italy Operational Unknown
612 01 Comstar Cellular Network Ivory Coast Operational Unknown
612 02 Telecel Ivory Coast Operational Unknown
612 03 S.I.M. Ivoiris Ivory Coast Operational Unknown
612 05 Loteny Telecom Telecel Ivory Coast Operational Unknown
338 05 Digicel Jamaica Operational Unknown
338 180 C&W Jamaica Operational Unknown
440     Japan Operational Unknown
416 01 J.M.T.S. Fastlink Jordan Operational Unknown
416 77 MobCom Jordan Operational Unknown
401 01 K-Mobile Kazakhstan Operational Unknown
401 02 K'Cell Kazakhstan Operational Unknown
639   Kenya Telecom Kenya Operational Unknown
450 05 SK Telecom Korea Operational Unknown
419 02 Mobile Telecoms / MTCNet Kuwait Operational Unknown
419 03 Wataniya Kuwait Operational Unknown
437 01 Bitel Ltd Kyrgyz Republic Operational Unknown
457 01 Lao Shinawatra Telecom Laos Operational Unknown
247 01 Latvian Mobile Tel. Latvia Operational Unknown
247 02 BALTCOM GSM / Tele 2 Latvia Operational Unknown
415 01 FTML Cellis Lebanon Operational Unknown
415 03 LibanCell Lebanon Operational Unknown
651 01 Vodacom Lesotho Operational Unknown
618 01 Omega Communications Liberia Operational Unknown
606 01 AlMadar Libya Operational Unknown
606 00 Libyana Libya Operational Unknown
228 01 Natel-D Liechtenstein Operational Unknown
246 01 Omnitel Lithuania Operational Unknown
246 02 UAB Bite GSM Lithuania Operational Unknown
246 03 Tele 2 Lithuania Operational Unknown
270 01 P&T LUXGSM Luxembourg Operational Unknown
270 77 Millicom Lux' S.A / Millicom Tango GSM Luxembourg Operational Unknown
455 01 C.T.M. Telemovel+ Macao Operational Unknown
294 01 T-Mobile Macedonia Macedonia Operational Unknown
646 01 Madacom Madagascar Operational Unknown
646 02 SMM Antaris Madagascar Operational Unknown
646 03 Sacel Madagascar Operational Unknown
650 01 TNL / Telecom Network Callpoint Malawi Operational Unknown
502 02 My BSB Malaysia Operational Unknown
502 03 Binariang Malaysia Operational Unknown
502 12 Binariang Communications Maxis Malaysia Operational Unknown
502 13 Celcom TM Malaysia Operational Unknown
502 16 DiGi Telecommunications Malaysia Operational Unknown
502 17 Binariang Communications Maxis Malaysia Operational Unknown
502 19 Celcom TM Malaysia Operational Unknown
278 01 Telecell Malta Operational Unknown
278   Advanced Malta Operational Unknown
617 01 Cellplus Mauritius Operational Unknown
334 20 Telcel Mexico Operational Unknown
259 01 Voxtel Moldova Operational 900 / 1800
259 02 Moldcell Moldova Operational 900 / 1800
208 01 France Telecom Monaco Operational Unknown
208 10 SFR Monaco Operational Unknown
208   Office des Telephones Monaco Operational Unknown
428 99 Mobicom Mongolia Operational Unknown
220 02 ProMonte Montenegro Operational Unknown
220 04 T-Mobile Montenegro Montenegro Operational Unknown
604 00 Meditel Morocco Operational Unknown
604 01 IAM / Maroc Telecom Morocco Operational Unknown
634 01 Telecom de Mocambique Mozambique Operational 1800
649 01 MTC Namibia Operational Unknown
204 04 Vodafone (former Libertel) Netherlands Operational Unknown
204 08 KPN Telecom Netherlands Operational Unknown
204 12 Telfort (former O2) Netherlands Operational Unknown
204 16 T-Mobile (former Ben) Netherlands Operational Unknown
204 20 Orange (former Dutchtone) Netherlands Operational Unknown
362 91 CHIPP Netherland Antilles (Netherlands) Operational Unknown
546 01 OPT Mobilis New Caledonia Operational Unknown
530 01 Vodafone New Zealand (formerly BellSouth New Zealand) New Zealand Operational 900/1800/2100
530 03 Telecom New Zealand New Zealand Reserved [1] 800
530 04 TelstraClear New Zealand Reserved [2] 900/1800/2100
621 20 Celtel (formally V-Mobile) Nigeria Operational Unknown
621 30 MTN Nigeria Operational Unknown
621 50 Glo Nigeria Operational Unknown
242 01 TeleNor Mobil Norway Operational Unknown
242 02 NetCom GSM Norway Operational Unknown
242 03 Teletopia Norway Operational Unknown
242 04 Tele2 Norway Operational Unknown
242 07 Ventelo Norway Operational Unknown
422 02 General Telecoms Oman Operational Unknown
410 01 Mobilink Pakistan Operational Unknown
410 03 UFONE Pakistan Operational Unknown
410 04 Paktel Pakistan Operational Unknown
410 06 Telenor Pakistan Operational Unknown
410 07 Warid Pakistan Operational Unknown
310 01 Pacific Mobile Comms Papua New Guinea Operational Unknown
310 01 VOX Paraguay Operational Unknown
515 01 Islacom / Isla Comms Philippines Operational Unknown
515 02 Globe Telecom Philippines Operational Unknown
515 03 Smart Communications Philippines Operational Unknown
260 01 Polkomtel Plus GSM Poland Operational Unknown
260 02 ERA GSM Poland Operational Unknown
260 03 Orange Poland Operational Unknown
268 01 Telecel Communicacoes / Vodafone Portugal Operational Unknown
268 03 Optimus Telecom. Portugal Operational Unknown
268 06 Telecom Moveis Nac. / TMN Portugal Operational Unknown
268   Main Road Telecoms Portugal Operational Unknown
427 01 Q-Net / Q-Tel QATARNET Qatar Operational Unknown
647 10 Societe Reunionnaise SRR Reunion Operational Unknown
226 01 Vodafone Romania Operational Unknown
226 03 Cosmote Romania Operational Unknown
226 10 Orange Romania Operational Unknown
250 01 MTS Russian Federation Operational Unknown
250 02 North West GSM / NW GSM / St. Petersburg / MegaFon Russian Federation Operational Unknown
250 03 NCC Russian Federation Operational Unknown
250 05 Siberian Cellular / SCS / Yenis / Yeniseytel Russian Federation Operational Unknown
250 07 BM Telecom / Zao SMARTS Russian Federation Operational Unknown
250 10 Dontelekom / Don Telecom Russian Federation Operational Unknown
250 12 New Telephone Company / Far Eastern Cellular Russian Federation Operational Unknown
250 13 Kuban GSM Russian Federation Operational Unknown
250 14 Di-ex Russian Federation Operational Unknown
250 16 NTC Russian Federation Operational Unknown
250 17 Ermak RMS Russian Federation Operational Unknown
250 19 RUS: INDIG Russian Federation Operational Unknown
250 20 TELE2 Russian Federation Operational Unknown
250 28 Extel Russian Federation Operational Unknown
250 39 Uraltel Russian Federation Operational Unknown
250 44 North Caucasian GSM Russian Federation Operational Unknown
250 99 KB Impuls BeeLine Russian Federation Operational Unknown
635 10 Rwandacell Rwanda Operational Unknown
222 10 Omnitel San Marino Operational Unknown
222 01 Telecom Italia Mobile San Marino Operational Unknown
222 88 Wind San Marino Operational Unknown
420 01 Ministry of PTT Al Jawal Saudi Arabia Operational Unknown
420 07 Electronics App' Est. / EAE Saudi Arabia Operational Unknown
608 01 Sonatel ALIZE Senegal Operational Unknown
633 01 Seychelles Cellular Services Seychelles Operational Unknown
220 01 Telenor Serbia Serbia Operational Unknown
220 03 MTS-YU Serbia Operational Unknown
633 10 Telecom Airtel Seychelles Operational Unknown
525 01 Singapore Telecom / SingTel Singapore Operational 900
525 02 Singapore Telecom / SingTel Singapore Operational 1800
525 03 MobileOne Asia / SGP-M1-3GS Singapore Operational Unknown
525 05 StarHub Singapore Operational Unknown
525   Binariang Singapore Operational Unknown
231 01 Orange Slovensko (GSM) Slovakia Operational Unknown
231 02 T-Mobile Slovensko (GSM) Slovakia Operational Unknown
231 03 Unient Communications Slovakia Operational Unknown
231 04 T-Mobile Slovensko (UMTS) Slovakia Operational Unknown
231 05 Mobile Enertainment Company Slovakia Operational Unknown
231 06 Telefonica O2 Slovakia Slovakia Operational Unknown
231 99 ?SR Slovakia Operational Unknown
293 40 Si.Mobil Slovenia Operational Unknown
293 41 Mobitel Slovenia Operational Unknown
655 01 Vodacom South Africa Operational Unknown
655 07 Cell C South Africa Operational Unknown
655 10 MTN South Africa Operational Unknown
214 01 Vodafone Spain Operational Unknown
214 03 Orange Spain Operational Unknown
214 04 Yoigo Spain Operational Unknown
214 05 Movistar (used by resellers) Spain Operational Unknown
214 06 Vodafone (used by resellers) Spain Operational Unknown
214 07 Movistar Spain Operational Unknown
214 08 Euskaltel (MVNO) Spain Operational Unknown
214 09 Orange (used by resellers) Spain Operational Unknown
413 02 MTN Networks Pvt Ltd / Dialog Sri Lanka Operational Unknown
634 01 Mobile Telephone Company / Mobitel Sudan Operational Unknown
653     Swaziland Operational Unknown
240 01 Telia Mobile Sweden Operational Unknown
240 02 3 / Hutchison 3G (UMTS) Sweden Operational Unknown
240 03 Nordisk Mobiltelefon (CDMA2000) Sweden Operational Unknown
240 05 Sweden 3G (UMTS) (Owned by Telia and Tele2) Sweden Operational Unknown
240 06 Telenor (UMTS) Sweden Operational Unknown
240 07 Tele2 / Comviq Sweden Operational Unknown
240 08 Telenor (was Vodafone which was Europolitan) Sweden Operational Unknown
240 21 Banverket MobiSir (GSM-R) Sweden Operational Unknown
228 01 Swisscom NATEL (GSM 900/1800) Switzerland Operational Unknown
228 02 diAx mobile / Sunrise Switzerland Operational Unknown
228 03 Orange Switzerland Operational Unknown
417 01 SyriaTel Syria Operational Unknown
417 09 Syrian Telecom Est. MOBILE Syria Operational Unknown
466 01 FarEasTone / Far EasTone Telecoms Taiwan Operational Unknown
466 06 Tuntex Telecom Taiwan Operational Unknown
466 88 KG Telecom Taiwan Operational Unknown
466 89 VIBO Telecom Taiwan Operational Unknown
466 92 LDTA Taiwan Operational Unknown
466 93 Mobitai Communications Taiwan Operational Unknown
466 97 Pacific Cellular TWN GSM Taiwan Operational Unknown
466 99 TransAsia Telecoms Taiwan Operational Unknown
466 11 Chunghwa Taiwan Operational Unknown
640 01 Tritel Tanzania Operational Unknown
640 05 Celtel Tanzania Operational Unknown
520 01 Advanced Info Service AIS GSM Thailand Operational Unknown
520 10 WCS IQ Thailand Operational Unknown
520 18 Total Access Comms / Total Access Worldphone Thailand Operational Unknown
520 23 Digital Phone Hello Thailand Operational Unknown
520 99 True (formally Orange) Thailand Operational Unknown
615 01 Togo Telecom TOGO CELL Togolese Republic Operational Unknown
374 12 TSTT Trinidad and Tobago Operational Unknown
374 13 Digicel Trinidad and Tobago Operational Unknown
605 02 Tunisian PTT / Tunisie Telecom Tunicell Tunisia Operational Unknown
286 01 Turkcell Turkey Operational Unknown
286 02 Vodafone Turkey Operational Unknown
286 03 Avea Turkey Operational Unknown
641 01 Celtel Cellular Uganda Operational Unknown
641 10 MTN Uganda Uganda Operational Unknown
255 01 UMC Ukraine Operational 900 / 1800
255 02 Beeline Ukraine Operational 900 / 1800
255 03 Kyivstar Ukraine Operational 900 / 1800
255 05 Golden Telecom Ukraine Operational 1800
255 06 life:) Ukraine Operational 900 / 1800
424 01 UAE ETISALAT-G1 United Arab Emirates Operational Unknown
424 02 UAE ETISALAT-G2 United Arab Emirates Operational Unknown
234 00 Virgin 3510i United Kingdom Operational Unknown
234 10 Cellnet / O2 United Kingdom Operational Unknown
234 15 Vodafone United Kingdom Operational Unknown
234 20 Hutchison 3G / 3 United Kingdom Operational Unknown
234 30 One 2 One / T-Mobile United Kingdom Operational Unknown
234 31 Virgin United Kingdom Operational Unknown
234 32 Virgin United Kingdom Operational Unknown
234 33 Orange United Kingdom Operational Unknown
234 50 Jersey Telecom United Kingdom Operational Unknown
234 55 Guernsey Telecom United Kingdom Operational Unknown
234 58 Manx Telecom United Kingdom Operational Unknown
310 000 Mid-Tex Celular United States of America Operational Unknown
310 012 Verizon Wireless United States of America Operational Unknown
310 013 MobileTel United States of America Operational Unknown
310 020 APC Sprint Spectrum United States of America Operational Unknown
310 090 Edge Wireless United States of America Operational Unknown
310 110 Wireless 2000 Telephone United States of America Operational Unknown
310 150 Bell South / BellSouth Mobility DCS / Cingular United States of America Operational Unknown
310 160 T-Mobile / Omnipoint Communications United States of America Operational Unknown
310 170 Pacific Bell Wireless / Cingular / T-Mobile United States of America Operational Unknown
310 180 Cingular United States of America Operational Unknown
310 190 Alaska Telecom Mobile United States of America Operational Unknown
310 200 T-Mobile Idaho / Oregon / Washington State United States of America Operational Unknown
310 210 T-Mobile Iowa United States of America Operational Unknown
310 220 T-Mobile Kansas / Oklahoma United States of America Operational Unknown
310 230 T-Mobile Utah United States of America Operational Unknown
310 240 T-Mobile New Mexico / Texas / Arizona United States of America Operational Unknown
310 250 T-Mobile Hawaii United States of America Operational Unknown
310 260 Western Wireless / Voicestream / T-Mobile United States of America Operational Unknown
310 270 Powertel / T-Mobile United States of America Operational Unknown
310 280 T-Mobile United States of America Operational Unknown
310 290 T-Mobile United States of America Operational Unknown
310 300 T-Mobile United States of America Operational Unknown
310 310 Aerial Communications / T-Mobile Florida United States of America Operational Unknown
310 380 AT&T Wireless / Cingular United States of America Operational Unknown
310 410 Cingular United States of America Operational Unknown
310 770 Iowa Wireless Services United States of America Operational Unknown
434 01 Buztel Uzbekistan Operational Unknown
434 04 Daewoo Unitel GSM Uzbekistan Operational Unknown
434 05 Coscom Uzbekistan Operational Unknown
434 07 UXB-UZD Uzbekistan Operational Unknown
222 10 Omnitel Vatican Operational Unknown
222 01 Telecom Italia Mobile Vatican Operational Unknown
222 88 Wind Vatican Operational Unknown
734 01 Infonet (Phasing into Digitel GSM) Venezuela Operational Unknown
734 02 Digitel GSM Venezuela Operational Unknown
734 03 Digicel (Phasing into Digitel GSM) Venezuela Operational Unknown
734 04 Movistar (In Testing Period as of Nov. 2006) Venezuela Operational Unknown
452 01 MTSC / Mobifon Vietnam Operational Unknown
452 02 DGPT Vietnam Operational Unknown
421 01 SabaFon Yemen Operational Unknown
630   African Telecom Net Zaire Operational Unknown
645 01 Zamcell Zambia Operational Unknown
648 01 NET*ONE Zimbabwe Operational Unknown
648 04 Telecel Zimbabwe Operational Unknown

An ITU PDF document dated June 2005 offers similar information and appears to be copyright free.

Notes

  1. ^ This carrier operates a CDMA network which does not use Mobile Network Codes. If at any time in the future Telecom establishes a GSM or UMTS network they will use the code reserved for them.
  2. ^ TelstraClear currently does not operate their own network, they instead use Vodafone's network which means their customers will actually be using the Vodafone (530-01) network in New Zealand. If TelstraClear establishes their own GSM or UMTS network they will use the code reserved for them.
================================================================

List of mobile country codes

 

From Wikipedia, the free encyclopedia

(Redirected from Mobile country code)
Jump to: navigation, search

This is a list of Mobile Country Codes (MCCs) defined in ITU E.212 ("Land Mobile Numbering Plan") for use in identifying mobile stations in wireless telephone networks, particularly GSM and UMTS networks. A MCC is often used in combination with a Mobile Network Code (as a "MCC / MNC tuple") in order to uniquely identify a network operator.

The MCC is part of the International Mobile Subscriber Identity (IMSI) number, which uniquely identifies a particular subscriber, and is stored on a (usually) removable SIM card. The current MCC (i.e. the country in which the modem is now) may also be obtained from a GSM/UMTS wireless modem using the AT command AT+COPS:

Contents

[hide]

//

By Country

Code Country
412 Afghanistan
276 Albania
603 Algeria
544 American Samoa (US)
213 Andorra
631 Angola
365 Anguilla
344 Antigua and Barbuda
722 Argentine Republic
283 Armenia
363 Aruba (Netherlands)
505 Australia
232 Austria
400 Azerbaijani Republic
364 Bahamas
426 Bahrain
470 Bangladesh
342 Barbados
257 Belarus
206 Belgium
702 Belize
616 Benin
350 Bermuda (UK)
402 Bhutan
736 Bolivia
218 Bosnia and Herzegovina
652 Botswana
724 Brazil
348 British Virgin Islands (UK)
528 Brunei Darussalam
284 Bulgaria
613 Burkina Faso
642 Burundi
456 Cambodia
624 Cameroon
302 Canada
625 Cape Verde
346 Cayman Islands (UK)
623 Central African Republic
622 Chad
730 Chile
461 China
460 China
732 Colombia
654 Comoros
630 Democratic Republic of the Congo
629 Republic of the Congo
548 Cook Islands (NZ)
712 Costa Rica
612 Cote d'Ivoire
219 Croatia
368 Cuba
280 Cyprus
230 Czech Republic
630 Democratic Republic of the Congo
238 Denmark
638 Djibouti
366 Dominica
370 Dominican Republic
514 East Timor
740 Ecuador
602 Egypt
706 El Salvador
627 Equatorial Guinea
657 Eritrea
248 Estonia
636 Ethiopia
288 Faroe Islands (Denmark)
542 Fiji
244 Finland
208 France
742 French Guiana (France)
547 French Polynesia (France)
628 Gabonese Republic
607 Gambia
282 Georgia
262 Germany
620 Ghana
266 Gibraltar (UK)
202 Greece
290 Greenland (Denmark)
352 Grenada
340 Guadeloupe (France)
535 Guam (US)
704 Guatemala
611 Guinea
632 Guinea-Bissau
738 Guyana
372 Haiti
708 Honduras
454 Hong Kong (PRC)
216 Hungary
274 Iceland
404 India
510 Indonesia
432 Iran
418 Iraq
272 Ireland
425 Israel
222 Italy
338 Jamaica
441 Japan
440 Japan
416 Jordan
401 Kazakhstan
639 Kenya
545 Kiribati
467 Korea, North
450 Korea, South
419 Kuwait
437 Kyrgyz Republic
457 Laos
247 Latvia
415 Lebanon
651 Lesotho
618 Liberia
606 Libya
295 Liechtenstein
246 Lithuania
270 Luxembourg
455 Macao (PRC)
294 Republic of Macedonia
646 Madagascar
650 Malawi
502 Malaysia
472 Maldives
610 Mali
278 Malta
551 Marshall Islands
340 Martinique (France)
609 Mauritania
617 Mauritius
334 Mexico
550 Federated States of Micronesia
259 Moldova
212 Monaco
428 Mongolia
354 Montserrat (UK)
604 Morocco
643 Mozambique
414 Myanmar
649 Namibia
536 Nauru
429 Nepal
204 Netherlands
362 Netherlands Antilles (Netherlands)
546 New Caledonia (France)
530 New Zealand
710 Nicaragua
614 Niger
621 Nigeria
534 Northern Mariana Islands (US)
242 Norway
422 Oman
410 Pakistan
552 Palau
714 Panama
537 Papua New Guinea
744 Paraguay
716 Peru
515 Philippines
260 Poland
268 Portugal
330 Puerto Rico (US)
427 Qatar
647 Reunion (France)
226 Romania
250 Russian Federation
635 Rwandese Republic
356 Saint Kitts and Nevis
358 Saint Lucia
308 Saint Pierre and Miquelon (France)
360 Saint Vincent and the Grenadines
549 Samoa
292 San Marino
626 Sao Tome and Principe
420 Saudi Arabia
608 Senegal
220 Serbia and Montenegro
633 Seychelles
619 Sierra Leone
525 Singapore
231 Slovakia
293 Slovenia
540 Solomon Islands
637 Somalia
655 South Africa
214 Spain
413 Sri Lanka
634 Sudan
746 Suriname
653 Swaziland
240 Sweden
228 Switzerland
417 Syria
466 Taiwan
436 Tajikistan
640 Tanzania
520 Thailand
615 Togolese Republic
539 Tonga
374 Trinidad and Tobago
605 Tunisia
286 Turkey
438 Turkmenistan
376 Turks and Caicos Islands (UK)
641 Uganda
255 Ukraine
424 United Arab Emirates
430 United Arab Emirates (Abu Dhabi)
431 United Arab Emirates (Dubai)
235 United Kingdom
234 United Kingdom
310 United States of America
311 United States of America
312 United States of America
313 United States of America
314 United States of America
315 United States of America
316 United States of America
332 United States Virgin Islands (US)
748 Uruguay
434 Uzbekistan
541 Vanuatu
225 Vatican City State
734 Venezuela
452 Viet Nam
543 Wallis and Futuna (France)
421 Yemen
645 Zambia
648 Zimbabwe

By Code

202 Greece
204 Netherlands
206 Belgium
208 France
212 Monaco
213 Andorra
214 Spain
216 Hungary
218 Bosnia and Herzegovina
219 Croatia
220 Serbia and Montenegro
222 Italy
225 Vatican City State
226 Romania
228 Switzerland
230 Czech Republic
231 Slovakia
232 Austria
234 United Kingdom
235 United Kingdom
238 Denmark
240 Sweden
242 Norway
244 Finland
246 Lithuania
247 Latvia
248 Estonia
250 Russian Federation
255 Ukraine
257 Belarus
259 Moldova
260 Poland
262 Germany
266 Gibraltar (UK)
268 Portugal
270 Luxembourg
272 Ireland
274 Iceland
276 Albania
278 Malta
280 Cyprus
282 Georgia
283 Armenia
284 Bulgaria
286 Turkey
288 Faroe Islands (Denmark)
290 Greenland (Denmark)
292 San Marino
293 Slovenia
294 Republic of Macedonia
295 Liechtenstein
302 Canada
308 Saint Pierre and Miquelon (France)
310 United States of America
311 United States of America
312 United States of America
313 United States of America
314 United States of America
315 United States of America
316 United States of America
330 Puerto Rico (US)
332 United States Virgin Islands (US)
334 Mexico
338 Jamaica
340 Guadeloupe (France)
340 Martinique (France)
342 Barbados
344 Antigua and Barbuda
346 Cayman Islands (UK)
348 British Virgin Islands (UK)
350 Bermuda (UK)
352 Grenada
354 Montserrat (UK)
356 Saint Kitts and Nevis
358 Saint Lucia
360 Saint Vincent and the Grenadines
362 Netherlands Antilles (Netherlands)
363 Aruba (Netherlands)
364 Bahamas
365 Anguilla
366 Dominica
368 Cuba
370 Dominican Republic
372 Haiti
374 Trinidad and Tobago
376 Turks and Caicos Islands (UK)
400 Azerbaijani Republic
401 Kazakhstan
402 Bhutan
404 India
410 Pakistan
412 Afghanistan
413 Sri Lanka
414 Myanmar
415 Lebanon
416 Jordan
417 Syria
418 Iraq
419 Kuwait
420 Saudi Arabia
421 Yemen
422 Oman
424 United Arab Emirates
425 Israel
426 Bahrain
427 Qatar
428 Mongolia
429 Nepal
430 United Arab Emirates (Abu Dhabi)
431 United Arab Emirates (Dubai)
432 Iran
434 Uzbekistan
436 Tajikistan
437 Kyrgyz Republic
438 Turkmenistan
440 Japan
441 Japan
450 South Korea
452 Viet Nam
454 Hong Kong (PRC)
455 Macao (PRC)
456 Cambodia
457 Laos
460 China
461 China
466 Taiwan
467 North Korea
470 Bangladesh
472 Maldives
502 Malaysia
505 Australia
510 Indonesia
514 East Timor
515 Philippines
520 Thailand
525 Singapore
528 Brunei Darussalam
530 New Zealand
534 Northern Mariana Islands (US)
535 Guam (US)
536 Nauru
537 Papua New Guinea
539 Tonga
540 Solomon Islands
541 Vanuatu
542 Fiji
543 Wallis and Futuna (France)
544 American Samoa (US)
545 Kiribati
546 New Caledonia (France)
547 French Polynesia (France)
548 Cook Islands (NZ)
549 Samoa
550 Micronesia
551 Marshall Islands
552 Palau
602 Egypt
603 Algeria
604 Morocco
605 Tunisia
606 Libya
607 Gambia
608 Senegal
609 Mauritania
610 Mali
611 Guinea
612 Cote d'Ivoire
613 Burkina Faso
614 Niger
615 Togolese Republic
616 Benin
617 Mauritius
618 Liberia
619 Sierra Leone
620 Ghana
621 Nigeria
622 Chad
623 Central African Republic
624 Cameroon
625 Cape Verde
626 Sao Tome and Principe
627 Equatorial Guinea
628 Gabonese Republic
629 Republic of the Congo
630 Democratic Republic of the Congo
631 Angola
632 Guinea-Bissau
633 Seychelles
634 Sudan
635 Rwandese Republic
636 Ethiopia
637 Somalia
638 Djibouti
639 Kenya
640 Tanzania
641 Uganda
642 Burundi
643 Mozambique
645 Zambia
646 Madagascar
647 Reunion
648 Zimbabwe
649 Namibia
650 Malawi
651 Lesotho
652 Botswana
653 Swaziland
654 Comoros
655 South Africa
657 Eritrea
702 Belize
704 Guatemala
706 El Salvador
708 Honduras
710 Nicaragua
712 Costa Rica
714 Panama
716 Peru
722 Argentine Republic
724 Brazil
730 Chile
732 Colombia
734 Venezuela
736 Bolivia
738 Guyana
740 Ecuador
742 French Guiana (France)
744 Paraguay
746 Suriname
748 Uruguay

[edit] Notes

  • 000-099, 100-199, and 800-899 are Reserved codes.
  • 901 is used for International Shared Codes, for allocations to trans-national networks (e.g. satellite). (See below table.)

[edit] International Shared Codes

The ITU designates MCC 901 as a container for super-political telephone services. The following are the network codes for super-political providers under MCC 901:

ICO Global Communications (link) 901 01
Sense Communications (link) 901 02
Iridium Satellite LLC 901 03
Globalstar 901 04
Thuraya RMSS Network (link) 901 05
Thuraya Satellite Telecommunications Company 901 06
Ellipso (link) 901 07
GSM unsubscribed (see note) 901 08
Tele1 Europe 901 09
Asia Cellular Satellite (link) 901 10
Inmarsat Ltd. 901 11
Maritime Communications Partner AS (link) 901 12
Global Networks, Inc. 901 13
Telenor 901 14
SITA (On Air) 901 15
Jasper Systems, Inc. 901 16
Jersey Telecom (link) 901 17
Cingular Wireless (link) 901 18
Vodafone Malta Maritime 901 19

 

이 글은 스프링노트에서 작성되었습니다.

드디어 오늘 구글의 안드로이드 SDK가 떴습니다.

http://code.google.com/android/

그리고 아래 URL에서는 구글폰의 UI 샘플도 볼 수 있습니다.


http://www.engadget.com/photos/a-visual-tour-of-androids-ui/


관심있는 사람들은 SDK 받아다가 한번 어플 만들어보는 것도 재미있을 거 같군요.
그리고 좋은 아이디어 있으면 제대로 한번 만들어 보세요.
총 상금 1000만 달러가 걸린 대회도 있습니다.

Android Developer Challenge( http://code.google.com/android/adc.html )

앞으로 재미있는 일들이 더 많을 거 같습니다.





Installing the SDK

This page describes how to install the Android SDK and set up your development environment. If you haven't downloaded the SDK yet, you can use the link below to get started.

Contents

System and Software Requirements
Installing the SDK
Installing the Eclipse Plugin (ADT)
Developing Android Applications on Eclipse
Developing Android Applications with Other IDEs and Tools
Debugging
Debug and Test Settings on the Device
Top Debugging Tips
Building and Installing an Android Application
Removing an Android Application
Eclipse Tips

System and Software Requirements

To develop Android applications using the code and tools in the Android SDK, you need a suitable development computer and development environment, as described below.

Supported Operating Systems

  • Windows XP or Vista
  • Mac OS X 10.4.8 or later (x86 only)
  • Linux (tested on Linux Ubuntu Dapper Drake)

Supported Development Environments

Installing the SDK

After downloading the SDK, unpack the .zip archive to a suitable location on your machine. For the rest of this document, we will refer to the directory where you installed the SDK as $SDK_ROOT.

Optionally, you can add $SDK_ROOT/tools to your path:

  • On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to your $SDK_ROOT/tools to it. If you don't see a line setting the path, you can add one:
    • export PATH=${PATH}:<path to your $SDK_ROOT/tools>
  • On a Mac, look in your home directory for .bash_profile and proceed as for Linux. You can create the .bash_profile, if you haven't already set one up on your machine.
  • On Windows, right click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path under System Variables, and add the full path to the tools/ directory under $SDK_ROOT to it.

Adding $SDK_ROOT/tools to your path lets you run Android Debug Bridge (adb) and the other command line tools without needing to supply the full path to the tools directory. Note that, if you update your SDK, you should remember to update your PATH settings to point to the new location, if different.

Installing the Eclipse Plugin (ADT)

If you will be using the Eclipse IDE as your environment for developing Android applications, you can install a custom plugin called Android Development Tools (ADT), which adds integrated support for Android projects and tools. The ADT plugin includes a variety of powerful extensions that make creating, running, and debugging Android applications faster and easier.

If you will not be using the Eclipse IDE, you do not need to download or install the ADT plugin.

To download and install the ADT plugin, set up an Eclipse remote update site as described in the steps below.

  1. Start Eclipse, then select Help > Software Updates > Find and Install....
  2. In the dialog that appears, select Search for new features to install and press Next.
  3. Press New Remote Site.
  4. In the resulting dialog box, enter a name for the remote site (e.g. Android Plugin) and enter this as its URL: https://dl-ssl.google.com/android/eclipse/. Press OK.
  5. You should now see the new site added to the search list (and checked). Press Finish.
  6. In the subsequent Search Results dialog box, select the checkbox for Android Plugin > Eclipse Integration > Android Development Tools and press Next.
  7. Read the license agreement and then select Accept terms of the license agreement, if appropriate. Press Next.
  8. Press Finish.
  9. The ADT plugin is not signed; you can accept the installation anyway by pressing Install All.
  10. Restart Eclipse.
  11. After restart, update your Eclipse preferences to point to the SDK root directory ($SDK_ROOT):
    1. Select Window > Preferences... to open the Preferences panel. (Mac OS X: Eclipse > Preferences)
    2. Select Android from the left panel.
    3. For the SDK Location in the main panel, press Browse... and find the SDK root directory.
    4. Press Apply, then OK

Updating the ADT Plugin

To update the ADT plugin to the latest version, follow these steps:

  1. Select Help > Software Updates > Find and Install....
  2. Select Search for updates of the currently installed features and press Finish.
  3. If any update for ADT is available, select and install.

Alternatively,

  1. Select Help > Software Updates > Manage Configuration.
  2. Navigate down the tree and select Android Development Tools <version>
  3. Select Scan for Updates under Available Tasks.

Developing Android Applications on Eclipse

To begin developing Android applications in the Eclipse IDE, you first create an Android project and then set up a launch configuration. After that, you can write, run, and debug your application.

The sections below provide instructions assuming that you have installed the ADT plugin in your Eclipse environment. If you haven't installed the ADT plugin, you should do that before using the instructions below. See the Installing the Eclipse Plugin (ADT) for more information.

Creating an Android Project

The ADT plugin provides a New Project Wizard that you can use to quickly create an Eclipse project for new or existing code. To create the project, follow these steps:

  1. Select File > New > Project
  2. Select Android > Android Project, and press Next
  3. Select the contents for the project:
    • Select Create new project in workspace to start a project for new code.

      Enter the project name, the base package name, the name of a single Activity class to create as a stub .java file, and a name to use for your application.

    • Select Create project from existing source to start a project from existing code. Use this option if you want to build and run any of the sample applications included with the SDK. The sample applications are located in the samples/ directory in the SDK.

      Browse to the directory containing the existing source code and click OK. If the directory contains a valid Android manifest file, the ADT plugin fills in the package, activity, and application names for you.

  4. Press Finish.

The ADT plugin creates the these folders and files for you as appropriate for the type of project:

  • src/   A folder that includes your stub .java Activity file.
  • res/   A folder for your resources.
  • AndroidManifest.xml   The manifest for your project.

Creating a Launch Configuration

Before you can run and debug your application in Eclipse, you must create a launch configuration for it. A launch configuration specifies the project to launch, the Activity to start, the emulator options to use, and so on.

To create a launch configuration for the application, follow these steps:

  1. Select Run > Open Run Dialog... or Run > Open Debug Dialog... as appropriate.
  2. In the project type list on the left, right-click Android Application and select New.
  3. Enter a name for your configuration.
  4. On the Android tab, browse for the project and Activity to start.
  5. On the Emulator tab, set the desired screen and network properties, as well as any other emulator startup options.
  6. You can set additional options on the Common tab as desired.
  7. Press Apply to save the launch configuration, or press Run or Debug (as appropriate).

Running and Debugging an Application

Once you've set up the project and launch configuration for your application, you can run or debug it as described below.

From the Eclipse main menu, select Run > Run or Run > Debug as appropriate, to run or debug the active launch configuration.

Note that the active launch configuration is the one most recently selected in the Run configuration manager. It does not necessarily correspond to the application that is selected in the Eclipse Navigation pane (if any).

To set or change the active launch configuration, use the Run configuration manager, which you can access through Run > Open Run Dialog... or Run > Open Debug Dialog....

Running or debugging the application triggers these actions:

  • Starts the emulator, if it is not already running.
  • Compiles the project, if there have been changes since the last build, and installs the application on the emulator.
  • Run starts the application.
  • Debug starts the application in "Wait for debugger" mode, then opens the Debug perspective and attaches the Eclipse Java debugger to the application.

Developing Android Applications with Other IDEs and Tools

The recommended way to develop an Android application is to use Eclipse with the Android plugin. This plugin provides editing, building, and debugging functionality integrated right into the IDE. However, the SDK includes tools to enable you to develop with other IDEs, including intelliJ (or if you'd rather use Eclipse without the plugin).

Creating an Android Project

The Android SDK includes activityCreator, a program that generates a number of stub files for your project, as well as a build file. You can use the program to create an Android project for new code or from existing code, such as the sample applications included in the SDK. For Linux and Mac, the SDK provides activityCreator.py, a Python script, and for Windows, activityCreator.bat, a batch script. Regardless of platform, you can use activityCreator in the same way.

To run activityCreator and create an Android project, follow these steps:

  1. In the command line, change to the tools/ directory of the SDK and create a new directory for your project files. If you are creating a project from existing code, change to the root folder of your application instead.
  2. Run activityCreator. In the command, you must specify a fully-qualified class name as an argument. If you are creating a project for new code, the class represents the name of a stub class that the script will create. If you are creating a project from existing code, you must specify the name of one Activity class in the package. Command options for the script include:

    • --out <folder> which sets the output directory. By default, the output directory is the current directory. If you created a new directory for your project files, use this option to point to it.
    • --ide intellij, which generates IntelliJ IDEA project files in the newly created project

Here's an example:

		~/android_linux_sdk/tools$ ./activityCreator.py --out myproject your.package.name.ActivityName
package: your.package.name
out_dir: myproject
activity_name: ActivityName
~/android_linux_sdk/tools$

The activityCreator script generates the following files and directories (but will not overwrite existing ones):

  • AndroidManifest.xml The application manifest file, synced to the specified Activity class for the project.
  • build.xml An Ant file that you can use to build/package the application.
  • src/your/package/name/ActivityName.java The Activity class you specified on input.
  • your_activity.iml, your_activity.ipr, your_activity.iws   [only with the -ide intelliJ flag] intelliJ project files.
  • res/   A directory to hold resources.
  • src/    The source directory.
  • bin/    The output directory for the build script.

You can now move your folder wherever you want for development, but keep in mind that you'll have to use the adb program in the tools/ folder to send files to the emulator, so you'll need access between your solution and the tools/ folder.

Also, you should refrain from moving the location of the SDK directory, since this will break the build scripts (they will need to be manually updated to reflect the new SDK location before they will work again).

Building an Android Application

Use the Ant build.xml file generated by activityCreator to build your application.

  1. If you don't have it, you can obtain Ant from the Apache Ant home page. Install it and make sure it is on your executable path.
  2. Before calling Ant, you need to declare the JAVA_HOME environment variable to specify the path to where the JDK is installed.
  3. Note: When installing JDK on Windows, the default is to install in the "Program Files" directory. This location will cause ant to fail, because of the space. To fix the problem, you can specify the JAVA_HOME variable like this: set JAVA_HOME=c:\Prora~1\Java\. The easiest solution, however, is to install JDK in a non-space directory, for example: c:\java\jdk1.6.0_02.

  4. If you have not done so already, follow the instructions for Creating a New Project above to set up the project.
  5. You can now run the Ant build file by simply typing ant in the same folder as the build.xml file for your project. Each time you change a source file or resource, you should run ant again and it will package up the latest version of the application for you to deploy.

Running an Android Application

To run a compiled application, you will upload the .apk file to the /data/app/ directory in the emulator using the adb tool as described here:

  1. Start the emulator (run $SDK_HOME/tools/emulator from the command line)
  2. On the emulator, navigate to the home screen (it is best not to have that application running when you reinstall it on the emulator; press the Home key to navigate away from that application).
  3. Run adb install myproject/bin/<appname>.apk to upload the executable. So, for example, to install the Lunar Lander sample, navigate in the command line to $SDK_ROOT/sample/LunarLander and type ../../tools/adb install bin/LunarLander.apk
  4. In the emulator, open the list of available applications, and scroll down to select and start your application.

Note: When you install an Activity for the first time, you might have to restart the emulator before it shows up in the application launcher, or other applications can call it. This is because the package manager usually only examines manifests completely on emulator startup.

Attaching a Debugger to Your Application

This section describes how to display debug information on the screen (such as CPU usage), as well as how to hook up your IDE to debug running applications on the emulator.

Attaching a debugger is automated using the Eclipse plugin, but you can configure other IDEs to listen on a debugging port to receive debugging information.

  1. Start the Dalvik Debug Monitor Server (DDMS) tool , which acts as a port forwarding service between your IDE and the emulator.
  2. Set optional debugging configurations on your emulator, such as blocking application startup for an activity until a debugger is attached. Note that many of these debugging options can be used without DDMS, such as displaying CPU usage or screen refresh rate on the emulator.
  3. Configure your IDE to attach to port 8700 for debugging. We include information on how to set up Eclipse to debug your project.

Configuring your IDE to attach to the debugging port

DDMS will assign a specific debugging port to every virtual machine that it finds on the emulator. You must either attach your IDE to that port (listed on the Info tab for that VM), or you can use a default port 8700 to connect to whatever application is currently selected on the list of discovered virtual machines.

Your IDE should attach to your application running on the emulator, showing you its threads and allowing you to suspend them, inspect their state, and set breakpoints. If you selected "Wait for debugger" in the Development settings panel the application will run when Eclipse connects, so you will need to set any breakpoints you want before connecting.

Changing either the application being debugged or the "Wait for debugger" option causes the system to kill the selected application if it is currently running. You can use this to kill your application if it is in a bad state by simply going to the settings and toggling the checkbox.

Debugging

Android has a fairly extensive set of tools to help you debug your programs:

  • DDMS - A graphical program that supports port forwarding (so you can set up breakpoints in your code in your IDE), screen captures on the emulator, thread and stack information, and many other features. You can also run logcat to retrieve your Log messages. See the linked topic for more information.
  • logcat - Dumps a log of system messages. The messages include a stack trace when the emulator throws an error, as well as Log messages. To run logcat, see the linked topic.
    ...
    I/MemoryDealer( 763): MemoryDealer (this=0x54bda0): Creating 2621440 bytes heap at 0x438db000
    I/Logger( 1858): getView() requesting item number 0
    I/Logger( 1858): getView() requesting item number 1
    I/Logger( 1858): getView() requesting item number 2

    D/ActivityManager( 763): Stopping: HistoryRecord{409dbb20 com.google.android.home.AllApps}
    ...
  • Android Log- A logging class to print out messages to a log file on the emulator. You can read messages in real time if you run logcat on DDMS (covered next). Add a few logging method calls to your code.

    To use the Log class, you just call Log.v() (verbose), Log.d() (debug), Log.i() (information), Log.w() (warning) or Log.e (error) depending on the importance you wish to assign the log message.

    Log.i("MyActivity", "MyClass.getView() — Requesting item number " + position)

    You can use logcat to read these messages

  • Traceview - Android can save a log of method calls and times to a logging file that you can view in a graphical reader called Traceview. See the linked topic for more information.
  • Eclipse plugin - The Eclipse Android plugin incorporates a number of these tools (ADB, DDMS, logcat output, and other functionality). See the linked topic for more information.
  • Debug and Test Device Settings - Android exposes several settings that expose useful information such as CPU usage and frame rate. See Debug and Test Settings on the Emulator below.

Also, see the Troubleshooting section of the doc to figure out why your application isn't appearing on the emulator, or why it's not starting.

Debug and Test Settings on the Device

Android lets you set a number of settings that will make it easier to test and debug your applications. To get to the development settings page on the emulator, go to Dev Tools > Development Settings. This will open the development settings page with the following options (among others):

  • Debug app   Selects the application that will be debugged. You do not need to set this to attach a debugger, but setting this value has two effects:
    • It will prevent Android from throwing an error if you pause on a breakpoint for a long time while debugging.
    • It will enable you to select the Wait for Debugger option to pause application startup until your debugger attaches (described next).
  • Wait for debugger   Blocks the selected application from loading until a debugger attaches. This way you can set a breakpoint in onCreate(), which is important to debug the startup process of an Activity. When you change this option, any currently running instances of the selected application will be killed. In order to check this box, you must have selected a debug application as described in the previous option. You can do the same thing by adding waitForDebugger() to your code.
  • Immediately destroy activities   Tells the system to destroy an activity as soon as it is stopped (as if Android had to reclaim memory).  This is very useful for testing the onFreeze(Bundle) / onCreate(android.os.Bundle) code path, which would otherwise be difficult to force. Choosing this option will probably reveal a number of problems in your application due to not saving state.
  • Show screen updates    Flashes a momentary pink rectangle on any screen sections that are being redrawn. This is very useful for discovering unnecessary screen drawing.
  • Show CPU usage   Displays CPU meters at the top of the screen, showing how much the CPU is being used. The top red bar shows overall CPU usage, and the green bar underneath it shows the CPU time spent in compositing the screen. Note: You cannot turn this feature off once it is on, without restarting the emulator.
  • Show screen FPS    Displays the current frame rate. Mostly useful for games to see the overall frame rate they are achieving. Note: You cannot turn this feature off once it is on without restarting the emulator.
  • Show background   Displays a background pattern when no activity screens are visible. This typically does not happen, but can happen during debugging.

These settings will be remembered across emulator restarts.

Top Debugging Tips

Quick stack dump
To obtain a stack dump from emulator, you can log in with adb shell, use "ps" to find the process you want, and then "kill -3 ". The stack trace appears in the log file.
Displaying useful info on the emulator screen
The device can display useful information such as CPU usage or highlights around redrawn areas. Turn these features on and off in the developer settings window as described in Setting debug and test configurations on the emulator.
Getting system state information from the emulator (dumpstate)
You can access dumpstate information from the Dalvik Debug Monitor Service tool. See dumpsys and dumpstate on the adb topic page.
Getting application state information from the emulator (dumpsys)
You can access dumpsys information from the Dalvik Debug Monitor Service tool. See dumpsys and dumpstate on the adb topic page.
Getting wireless connectivity information
You can get information about wireless connectivity using the Dalvik Debug Monitor Service tool. From the Device menu, select "Dump radio state".
Logging Trace Data
You can log method calls and other tracing data in an activity by calling android.os.Debug.startMethodTracing(). See Running the Traceview Debugging Program for details.
Logging Radio Data
By default, radio information is not logged to the system (it is a lot of data). However, you can enable radio logging using the following commands:
adb shell
logcat -b radio
Running adb
Android ships with a tool called adb that provides various capabilities, including moving and syncing files to the emulator, forwarding ports, and running a UNIX shell on the emulator. See Using adb for details.
Getting screen captures from the emulator
Dalvik Debug Monitor Server (DDMS) can capture screenshots from the emulator.
Using debugging helper classes
Android provides debug helper classes such as util.Log and Debug for your convenience.

Building and Installing an Android Application

Android requires custom build tools to be able to properly build the resource files and other parts of an Android application. Because of this, you must have a specialized build environment for your application.

Custom Android compilation steps include compiling the XML and other resource files, and creating the proper output format. A compiled Android application is an .apk file, which is a compressed file containing .dex files, resource files, raw data files, and other files. You can create a properly structured Android project either from scratch, or from existing source files.

Android does not currently support development of third party applications in native code (C/C++).

The recommended way to develop an Android application is to use Eclipse with the Android plugin, which provides support for building, running, and debugging Android applications.

If you have another IDE, Android provides tools for other IDEs to build and debug Android applications, but they are not as integrated.

Removing an Android Application

To remove an application that you have installed on the emulator, you will need to run adb and delete the .apk file you sent to the emulator when you installed it. Use adb shell to drop into a shell on the device as described in the linked topic, navigate to data/app/, and then remove the file using rm your_app.apk.

Eclipse Tips

Executing arbitrary Java expressions in Eclipse

You can execute arbitrary code when paused at a breakpoint in Eclipse. For example, when in a function with a String argument called "zip", you can get information about packages and call class methods. You can also invoke arbitrary static methods: for example, entering android.os.Debug.startMethodTracing() will start dmTrace.

Open a code execution window, select Window>Show View>Display from the main menu to open the Display window, a simple text editor. Type your expression, highlight the text, and click the 'J' icon (or CTRL + SHIFT + D) to run your code. The code runs in the context of the selected thread, which must be stopped at a breakpoint or single-step point. (If you suspend the thread manually, you have to single-step once; this doesn't work if the thread is in Object.wait().)

If you are currently paused on a breakpoint, you can simply highlight and execute a piece of source code by pressing CTRL + SHIFT + D.

You can highlight a block of text within the same scope by pressing ALT +SHIFT + UP ARROW to select larger and larger enclosing blocks, or DOWN ARROW to select smaller blocks.

Here are a few sample inputs and responses in Eclipse using the Display window.

Input Response
zip (java.lang.String) /work/device/out/linux-x86-debug/android/app/android_sdk.zip
zip.endsWith(".zip") (boolean) true
zip.endsWith(".jar") (boolean) false

You can also execute arbitrary code when not debugging by using a scrapbook page. Search the Eclipse documentation for "scrapbook".

Running DDMS Manually

Although the recommended way to debug is to use the ADT plugin, you can manually run DDMS and configure Eclipse to debug on port 8700. (Note: Be sure that you have first started DDMS).

+ Recent posts