Linux/Ubuntu2011. 11. 5. 23:55
vlan은 우분투에서 vlan 패키지로 vconfig라는 프로그램을 제공하게 된다.

$ vconfig
'vconfig' 프로그램은 현재 설치되어 있지 않습니다.  다음을 입력하여 이를 설치할 수 있습니다:
sudo apt-get install vlan

$ sudo apt-get install vlan
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
다음 새 패키지를 설치할 것입니다:
  vlan
0개 업그레이드, 1개 새로 설치, 0개 지우기 및 2개 업그레이드 안 함.
40.3k바이트 아카이브를 받아야 합니다.
이 작업 후 180k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://kr.archive.ubuntu.com/ubuntu/ lucid/main vlan 1.9-3ubuntu3 [40.3kB]
내려받기 40.3k바이트, 소요시간 0초 (242k바이트/초)
전에 선택하지 않은 vlan 패키지를 선택합니다.
(데이터베이스 읽는중 ...현재 185765개의 파일과 디렉토리가 설치되어 있습니다.)
vlan 패키지를 푸는 중입니다 (.../vlan_1.9-3ubuntu3_i386.deb에서) ...
man-db에 대한 트리거를 처리하는 중입니다 ...
vlan (1.9-3ubuntu3) 설정하는 중입니다 ...

$ vconfig
Expecting argc to be 3-5, inclusive.  Was: 1

Usage: add             [interface-name] [vlan_id]
       rem             [vlan-name]
       set_flag        [interface-name] [flag-num]       [0 | 1]
       set_egress_map  [vlan-name]      [skb_priority]   [vlan_qos]
       set_ingress_map [vlan-name]      [skb_priority]   [vlan_qos]
       set_name_type   [name-type]

* The [interface-name] is the name of the ethernet card that hosts
  the VLAN you are talking about.
* The vlan_id is the identifier (0-4095) of the VLAN you are operating on.
* skb_priority is the priority in the socket buffer (sk_buff).
* vlan_qos is the 3 bit priority in the VLAN header
* name-type:  VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5),
              DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5)
* FLAGS:  1 REORDER_HDR  When this is set, the VLAN device will move the
            ethernet header around to make it look exactly like a real
            ethernet device.  This may help programs such as DHCPd which
            read the raw ethernet packet and make assumptions about the
            location of bytes.  If you don't need it, don't turn it on, because
            there will be at least a small performance degradation.  Default
            is OFF.

$ sudo modprobe 8021q

$ lsmod | grep 8021q
8021q                  18564  0 
garp                    6284  1 8021q

$ sudo vconfig add eth0 10
Added VLAN with VID == 10 to IF -:eth0:-

$ sudo ifconfig eth0.10 10.0.0.1 netmask 255.255.255.0

$ ifconfig
eth0.10   Link encap:Ethernet  HWaddr 00:e0:91:0b:75:8c  
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:91ff:fe0b:758c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:2110 (2.1 KB) 

[링크 : https://wiki.ubuntu.com/vlan]

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

vlan 1은 지원안함?  (0) 2011.11.06
ip alias on ubuntu  (0) 2011.11.05
netbeans package - ubuntu  (0) 2011.10.22
sudo timeout 늘리기  (0) 2011.10.05
리눅스에서 하드 I/O 사용량 측정하는 방법  (0) 2011.09.27
Posted by 구차니
Linux2011. 11. 5. 22:24
vlan은 eth0.1 과 같이 이름이 붙고
ip alias는 eth0:1 과 같이 이름이 붙는다.

vlan은 물리적 네트워크에서 논리적으로 네트워크를 분리하는 기술이고
ip alias는 하나의 NIC에 복수개의 ip를 할당하는 기술이다.
하나의 장치에 여러개의 아이피가 부여된다는 동일하지만
ip alias를 아이피를 부여하는 기반기술이고 그걸 기반으로 vlan이 돌아간다고
해야하니 연관이 없진 않은 것 같기도 하고 흐음...
시간이 흘러 구현이 되었을수도 있지만
wireless에서는 vlan(802.1q)가 지원되지 않는다고 한다.

아무튼 검색할 꺼리를 던져준 동기에게 쌩유! ㅋㅋ

[링크 : https://wiki.ubuntu.com/vlan]
[링크 : http://www.cyberciti.biz/tips/ubuntu-linux-creating-ethernet-alias-for-eth0-network-device.html]

'Linux' 카테고리의 다른 글

리눅스를 라우터로 만들기  (0) 2011.12.02
SATA 와 IDE 하드 순서 인식 뒤바뀌는 문제  (0) 2011.11.23
xz 압축프로그램  (2) 2011.10.28
리눅스에서 파일 복구  (0) 2011.10.24
which 와 whereis  (0) 2011.10.24
Posted by 구차니
Linux2011. 10. 28. 22:33
id-util 이라는걸 받다가 발견한 희한한 확장자
검색을 해보니 bzip2 와 같은 LZMA 방식의 무손실 압축기법이고

리눅스에서 명령어는 xz 이다.
$ xz --help
Usage: xz [OPTION]... [FILE]...
Compress or decompress FILEs in the .xz format.

Mandatory arguments to long options are mandatory for short options too.

  -z, --compress      force compression
  -d, --decompress    force decompression
  -t, --test          test compressed file integrity
  -l, --list          list information about files
  -k, --keep          keep (don't delete) input files
  -f, --force         force overwrite of output file and (de)compress links
  -c, --stdout        write to standard output and don't delete input files
  -0 .. -9            compression preset; 0-2 fast compression, 3-5 good
                      compression, 6-9 excellent compression; default is 6
  -e, --extreme       use more CPU time when encoding to increase compression
                      ratio without increasing memory usage of the decoder
  -q, --quiet         suppress warnings; specify twice to suppress errors too
  -v, --verbose       be verbose; specify twice for even more verbose
  -h, --help          display this short help and exit
  -H, --long-help     display the long help (lists also the advanced options)
  -V, --version       display the version number and exit

With no FILE, or when FILE is -, read standard input.

Report bugs to <lasse.collin@tukaani.org> (in English or Finnish).
XZ Utils home page: <http://tukaani.org/xz/> 

[링크 : http://ftp.gnu.org/gnu/idutils/]
[링크 : http://en.wikipedia.org/wiki/Xz ]
[링크 : http://en.wikipedia.org/wiki/XZ_Utils]

'Linux' 카테고리의 다른 글

SATA 와 IDE 하드 순서 인식 뒤바뀌는 문제  (0) 2011.11.23
vlan과 ip alias  (0) 2011.11.05
리눅스에서 파일 복구  (0) 2011.10.24
which 와 whereis  (0) 2011.10.24
top은 잊어라! htop  (0) 2011.10.07
Posted by 구차니
Linux2011. 10. 24. 22:09
우분투의 경우에는 기본적으로 debugfs가 내장되어 있으니
사용법만 안다면 이걸로 삭제된 파일도 복구가 가능할듯하다.

[링크 : http://blog.foxb.kr/211]              foremost package
[링크 : http://shared.tistory.com/64]      testdisk package
[링크 : http://sharpwork.pe.kr/bbs/board.php?folder=&bo_table=linux&page=1&bbs_id=2366] debugfs

[링크 : http://linux.die.net/man/8/debugfs]

'Linux' 카테고리의 다른 글

vlan과 ip alias  (0) 2011.11.05
xz 압축프로그램  (2) 2011.10.28
which 와 whereis  (0) 2011.10.24
top은 잊어라! htop  (0) 2011.10.07
멀티코어 시스템의 cpu 사용율 체크하기  (0) 2011.10.07
Posted by 구차니
Linux2011. 10. 24. 21:24
습관이 되서 명령어 찾는데 whereis를 쓰지만
which는 명령어만 찾아주므로 더욱 빠르게 (하드에 덜 부담을 주고?) 찾을수 있는 장점이 있다.

$ which ls
/bin/ls

$ whereis ls
ls: /bin/ls /usr/share/man/man1/ls.1.gz 

$ man -k wh
whereis (1)          - locate the binary, source, and manual page files for a command
which (1)            - locate a command 

[링크 : http://linux.die.net/man/1/whereis]
[링크 : http://linux.die.net/man/1/which]

'Linux' 카테고리의 다른 글

xz 압축프로그램  (2) 2011.10.28
리눅스에서 파일 복구  (0) 2011.10.24
top은 잊어라! htop  (0) 2011.10.07
멀티코어 시스템의 cpu 사용율 체크하기  (0) 2011.10.07
/usr/bin/[ 넌 모니?  (0) 2011.10.05
Posted by 구차니
Linux/Ubuntu2011. 10. 22. 22:41
오랫만에 JFC좀 해볼려고 했더니... 용량의 압박이 좀 쩌는듯 -_-

$ sudo apt-get install netbeans
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
다음 패키지를 더 설치할 것입니다:
  ant ant-gcj ant-optional ant-optional-gcj apache2-utils ca-certificates-java
  default-jdk default-jdk-doc default-jre default-jre-headless gcj-4.4-base
  gcj-4.4-jre-lib icedtea-6-jre-cacao java-common javahelp2 jetty jruby1.1
  jsvc junit junit4 libaccess-bridge-java libaccess-bridge-java-jni
  libappframework-java libasm2-java libbeansbinding-java libcobertura-java
  libcommons-beanutils-java libcommons-collections3-java
  libcommons-compress-java libcommons-daemon-java libcommons-digester-java
  libcommons-logging-java libcommons-net-java libdb-je-java libdb4.7-java
  libdb4.7-java-gcj libfreemarker-java libgcj-bc libgcj-common libgcj10
  libhamcrest-java libicu4j-java libini4j-java libjaxp1.3-java libjetty-java
  libjetty-java-doc libjline-java libjna-java libjsch-java libjtidy-java
  libjzlib-java liblog4j1.2-java liblucene2-java libnb-apisupport1-java
  libnb-ide12-java libnb-java3-java libnb-javaparser-java
  libnb-platform-devel-java libnb-platform11-java libnb-svnclientadapter-java
  liboro-java libregexp-java libservlet2.3-java libservlet2.4-java
  libservlet2.5-java libslf4j-java libsvn-java libswing-layout-java
  libswingworker-java libswingx-java libxerces2-java
  libxml-commons-resolver1.1-java openjdk-6-doc openjdk-6-jdk openjdk-6-jre
  openjdk-6-jre-headless openjdk-6-jre-lib tzdata-java
제안하는 패키지:
  ant-doc libbsf-java libxalan2-java jython antlr libbcel-java libjdepend-java
  libgnumail-java javacc equivs javahelp2-doc libjetty-extra-java
  libjetty-extra junit-doc libappframework-java-doc libswingworker-java-doc
  libcommons-beanutils-java-doc libcommons-collections3-java-doc
  java-virtual-machine libcommons-digester-java-doc libexcalibur-logkit-java
  libavalon-framework-java libcommons-logging-java-doc libgcj10-dbg
  libgcj10-awt libjaxp1.3-java-gcj libjline-java-doc libjna-java-doc
  libjtidy-java-doc liblog4j1.2-java-gcj libmx4j-java
  libnb-platform11-java-doc libservlet2.4-java-gcj libjavassist-java
  libswing-layout-java-doc libxerces2-java-doc libxerces2-java-gcj
  libxml-commons-resolver1.1-java-doc openjdk-6-demo openjdk-6-source visualvm
  icedtea6-plugin sun-java6-fonts ttf-sazanami-gothic ttf-kochi-gothic
  ttf-sazanami-mincho ttf-kochi-mincho ttf-telugu-fonts ttf-oriya-fonts
  ttf-kannada-fonts ttf-bengali-fonts
다음 새 패키지를 설치할 것입니다:
  ant ant-gcj ant-optional ant-optional-gcj apache2-utils ca-certificates-java
  default-jdk default-jdk-doc default-jre default-jre-headless gcj-4.4-base
  gcj-4.4-jre-lib icedtea-6-jre-cacao java-common javahelp2 jetty jruby1.1
  jsvc junit junit4 libaccess-bridge-java libaccess-bridge-java-jni
  libappframework-java libasm2-java libbeansbinding-java libcobertura-java
  libcommons-beanutils-java libcommons-collections3-java
  libcommons-compress-java libcommons-daemon-java libcommons-digester-java
  libcommons-logging-java libcommons-net-java libdb-je-java libdb4.7-java
  libdb4.7-java-gcj libfreemarker-java libgcj-bc libgcj-common libgcj10
  libhamcrest-java libicu4j-java libini4j-java libjaxp1.3-java libjetty-java
  libjetty-java-doc libjline-java libjna-java libjsch-java libjtidy-java
  libjzlib-java liblog4j1.2-java liblucene2-java libnb-apisupport1-java
  libnb-ide12-java libnb-java3-java libnb-javaparser-java
  libnb-platform-devel-java libnb-platform11-java libnb-svnclientadapter-java
  liboro-java libregexp-java libservlet2.3-java libservlet2.4-java
  libservlet2.5-java libslf4j-java libsvn-java libswing-layout-java
  libswingworker-java libswingx-java libxerces2-java
  libxml-commons-resolver1.1-java netbeans openjdk-6-doc openjdk-6-jdk
  openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib tzdata-java
0개 업그레이드, 79개 새로 설치, 0개 지우기 및 0개 업그레이드 안 함.
174M바이트 아카이브를 받아야 합니다.
작업 후 698M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까 [Y/n]?  

[링크 : http://packages.ubuntu.com/hardy/netbeans]
[링크 : https://help.ubuntu.com/community/Netbeans]

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

ip alias on ubuntu  (0) 2011.11.05
vlan on ubnutu  (0) 2011.11.05
sudo timeout 늘리기  (0) 2011.10.05
리눅스에서 하드 I/O 사용량 측정하는 방법  (0) 2011.09.27
엠퍼시 (empathy) 에서 음성대화하기  (2) 2011.09.25
Posted by 구차니
Linux2011. 10. 7. 17:15
아 이거슨 혁명이여 -_-
패키지 명 htop

putty에서 클릭도 되고 페이지 업/다운으로 볼수도 있고
정렬도 되고 top따윈 비교도 안됨 !!!

 

'Linux' 카테고리의 다른 글

리눅스에서 파일 복구  (0) 2011.10.24
which 와 whereis  (0) 2011.10.24
멀티코어 시스템의 cpu 사용율 체크하기  (0) 2011.10.07
/usr/bin/[ 넌 모니?  (0) 2011.10.05
Linux 휴지통 분석(?)  (2) 2011.10.03
Posted by 구차니
Linux2011. 10. 7. 16:52
sysstat 패키지의 mpstat 을 사용해서 보는수 밖에 없는것 같기도 한데..

$ mpstat -P ALL
Linux 2.6.38-11-generic (jason-empty)   2011년 10월 07일        _x86_64_        (48 CPU)

            CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
             all    0.45   34.51    0.19    0.31    0.00    0.01    0.00    0.00   64.53
               0    2.25   32.11    1.20    0.63    0.00    0.08    0.00    0.00   63.72
               1    0.93   35.54    0.33    0.20    0.00    0.02    0.00    0.00   62.98
               2    0.70   39.86    0.16    0.12    0.00    0.00    0.00    0.00   59.16
               3    0.67   35.26    0.12    0.08    0.00    0.01    0.00    0.00   63.85
               4    0.32   35.04    0.11    0.09    0.00    0.02    0.00    0.00   64.43
               5    0.04   33.74    0.03    0.07    0.00    0.00    0.00    0.00   66.13
               6    0.50   38.46    0.25    1.52    0.00    0.02    0.00    0.00   59.25
               7    0.67   33.38    0.38    0.58    0.00    0.00    0.00    0.00   65.00
               8    0.16   35.08    0.06    0.10    0.00    0.00    0.00    0.00   64.61
               9    0.09   34.11    0.05    0.14    0.00    0.00    0.00    0.00   65.61
              10    0.06   32.53    0.06    0.08    0.00    0.00    0.00    0.00   67.27
              11    0.00   33.08    0.01    0.07    0.00    0.00    0.00    0.00   66.83
              12    1.93   34.21    0.58    0.35    0.00    0.03    0.00    0.00   62.90
              13    1.09   33.55    0.42    0.12    0.00    0.00    0.00    0.00   64.81
              14    2.20   30.88    0.77    0.16    0.00    0.07    0.00    0.00   65.91
              15    0.68   32.55    0.25    0.12    0.00    0.00    0.00    0.00   66.39
              16    0.42   32.44    0.16    0.09    0.00    0.00    0.00    0.00   66.89
              17    0.37   32.33    0.13    0.07    0.00    0.00    0.00    0.00   67.10
              18    0.55   34.98    0.33    1.71    0.00    0.02    0.00    0.00   62.41
              19    0.56   32.82    0.27    0.77    0.00    0.00    0.00    0.00   65.58
              20    0.23   32.71    0.10    0.22    0.00    0.00    0.00    0.00   66.74
              21    0.27   32.12    0.11    0.10    0.00    0.00    0.00    0.00   67.40
              22    0.17   33.00    0.07    0.07    0.00    0.00    0.00    0.00   66.68
              23    0.05   33.69    0.02    0.00    0.00    0.00    0.00    0.00   66.24
              24    0.25   46.35    0.10    0.31    0.00    0.00    0.00    0.00   52.99
              25    0.85   36.71    0.20    0.17    0.00    0.00    0.00    0.00   62.07
              26    0.74   32.46    0.25    0.12    0.00    0.09    0.00    0.00   66.35
              27    0.11   34.07    0.03    0.08    0.00    0.00    0.00    0.00   65.70
              28    0.02   33.05    0.02    0.07    0.00    0.00    0.00    0.00   66.84
              29    0.04   33.04    0.02    0.07    0.00    0.00    0.00    0.00   66.83
              30    0.39   38.23    0.14    0.96    0.00    0.00    0.00    0.00   60.26
              31    0.26   35.39    0.16    0.55    0.00    0.00    0.00    0.00   63.64
              32    0.11   33.66    0.04    0.11    0.00    0.00    0.00    0.00   66.08
              33    0.03   34.54    0.02    0.06    0.00    0.00    0.00    0.00   65.35
              34    0.05   33.83    0.03    0.08    0.00    0.00    0.00    0.00   66.01
              35    0.06   33.03    0.03    0.07    0.00    0.00    0.00    0.00   66.82
              36    0.62   52.54    0.32    2.24    0.00    0.04    0.00    0.00   44.24
              37    0.29   33.69    0.18    0.27    0.00    0.00    0.00    0.00   65.57
              38    0.12   35.01    0.10    0.40    0.00    0.00    0.00    0.00   64.37
              39    0.19   33.44    0.09    0.09    0.00    0.00    0.00    0.00   66.20
              40    0.14   33.73    0.06    0.07    0.00    0.00    0.00    0.00   65.99
              41    0.07   33.27    0.03    0.02    0.00    0.00    0.00    0.00   66.61
              42    0.74   31.73    0.35    1.21    0.00    0.01    0.00    0.00   65.95
              43    0.65   33.18    0.37    0.45    0.00    0.00    0.00    0.00   65.35
              44    0.19   33.79    0.09    0.03    0.00    0.00    0.00    0.00   65.90
              45    0.15   33.24    0.10    0.01    0.00    0.00    0.00    0.00   66.50
              46    0.16   33.04    0.07    0.06    0.00    0.00    0.00    0.00   66.68
              47    0.26   32.19    0.13    0.00    0.00    0.00    0.00    0.00   67.42 
[링크 : http://www.cyberciti.biz/tips/how-do-i-find-out-linux-cpu-utilization.html]

아무튼 gnome의
gnome-system-monitor는 32개가 한계인것 같고 



KDE의 ksysguard 는 띄우기는 하는데 모니터의 압박이...

 

'Linux' 카테고리의 다른 글

which 와 whereis  (0) 2011.10.24
top은 잊어라! htop  (0) 2011.10.07
/usr/bin/[ 넌 모니?  (0) 2011.10.05
Linux 휴지통 분석(?)  (2) 2011.10.03
리눅스 부팅으로 부터의 시간  (0) 2011.09.27
Posted by 구차니
Linux/Ubuntu2011. 10. 5. 22:56
visudo를 이용해서 Defaults에 아래의 항목을 추가하면 600분(10시간) 동안 물어보지 않는다.
$ sudo visudo
Defaults        env_reset,timestamp_timeout=600 

[링크 : http://ubuntu.or.kr/viewtopic.php?p=47637]
[링크 : http://lumitech.tistory.com/entry/sudoAndSudoer]

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

vlan on ubnutu  (0) 2011.11.05
netbeans package - ubuntu  (0) 2011.10.22
리눅스에서 하드 I/O 사용량 측정하는 방법  (0) 2011.09.27
엠퍼시 (empathy) 에서 음성대화하기  (2) 2011.09.25
우분투 LTS 지원기간  (0) 2011.09.24
Posted by 구차니
Linux2011. 10. 5. 14:36
도대체 이녀석 정체가 멀까?
도움말 상으로는 test로 연결이 되는데 흐음...
쉘 스크립트에서 사용하는 [] 랑 연관이 있는걸까?

[링크 : http://linux.die.net/man/1/test


$ ll -al \[
-rwxr-xr-x 1 root root 42584 2010-09-22 03:33 [* 

$ man -k "\["
[ (1)                - check file types and compare values 

$ file [
[: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped 

% ./\[ --help
BusyBox v1.14.2 (2011-01-24 14:35:28 KST) multi-call binary

Usage: [ EXPRESSION ]

Check file types, compare values etc. Return a 0/1 exit code
depending on logical value of EXPRESSION 

/usr/bin$ ./\[ --help
사용법: test 표현식
  또는:  test
  또는:  [ 표현식 ]
  또는:  [ ]
  또는:  [ 옵션
Exit with the status determined by EXPRESSION.

      --help     이 도움말을 표시하고 끝냅니다
      --version  버전 정보를 출력하고 끝냅니다

An omitted EXPRESSION defaults to false.  Otherwise,
EXPRESSION is true or false and sets exit status.  It is one of:

  ( EXPRESSION )               EXPRESSION is true
  ! EXPRESSION                 EXPRESSION is false
  EXPRESSION1 -a EXPRESSION2   both EXPRESSION1 and EXPRESSION2 are true
  EXPRESSION1 -o EXPRESSION2   either EXPRESSION1 or EXPRESSION2 is true

  -n STRING            the length of STRING is nonzero
  STRING               equivalent to -n STRING
  -z STRING            the length of STRING is zero
  STRING1 = STRING2    the strings are equal
  STRING1 != STRING2   the strings are not equal

  INTEGER1 -eq INTEGER2   INTEGER1 is equal to INTEGER2
  INTEGER1 -ge INTEGER2   INTEGER1 is greater than or equal to INTEGER2
  INTEGER1 -gt INTEGER2   INTEGER1 is greater than INTEGER2
  INTEGER1 -le INTEGER2   INTEGER1 is less than or equal to INTEGER2
  INTEGER1 -lt INTEGER2   INTEGER1 is less than INTEGER2
  INTEGER1 -ne INTEGER2   INTEGER1 is not equal to INTEGER2

  FILE1 -ef FILE2   FILE1 and FILE2 have the same device and inode numbers
  FILE1 -nt FILE2   FILE1 is newer (modification date) than FILE2
  FILE1 -ot FILE2   FILE1 is older than FILE2

  -b FILE     FILE exists and is block special
  -c FILE     FILE exists and is character special
  -d FILE     FILE exists and is a directory
  -e FILE     FILE exists
  -f FILE     FILE exists and is a regular file
  -g FILE     FILE exists and is set-group-ID
  -G FILE     FILE exists and is owned by the effective group ID
  -h FILE     FILE exists and is a symbolic link (same as -L)
  -k FILE     FILE exists and has its sticky bit set
  -L FILE     FILE exists and is a symbolic link (same as -h)
  -O FILE     FILE exists and is owned by the effective user ID
  -p FILE     FILE exists and is a named pipe
  -r FILE     FILE exists and read permission is granted
  -s FILE     FILE exists and has a size greater than zero
  -S FILE     FILE exists and is a socket
  -t FD       file descriptor FD is opened on a terminal
  -u FILE     FILE exists and its set-user-ID bit is set
  -w FILE     FILE exists and write permission is granted
  -x FILE     FILE exists and execute (or search) permission is granted

Except for -h and -L, all FILE-related tests dereference symbolic links.
Beware that parentheses need to be escaped (e.g., by backslashes) for shells.
INTEGER may also be -l STRING, which evaluates to the length of STRING.

NOTE: [ honors the --help and --version options, but test does not.
test treats each of those as it treats any other nonempty STRING.

NOTE: your shell may have its own version of test and/or [, which usually supersedes
the version described here.  Please refer to your shell's documentation
for details about the options it supports.

Report [ bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report [ translation bugs to <http://translationproject.org/team/> 

Posted by 구차니