# sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n /etc/hosts
::1 localhost6.localdomain6 localhost6
2.3.4.5 www.linuxtip.net www
33.22.11.22 www.linuxtip.net www
33.22.11.35 www.linuxtip.net www
127.0.0.1 localdomain localhost
sort
-t, --field-separator=SEP
use SEP instead of non-blank to blank transition
use SEP instead of non-blank to blank transition
-k, --key=POS1[,POS2]
start a key at POS1, end it at POS2 (origin 1)
start a key at POS1, end it at POS2 (origin 1)
'서버관리' 카테고리의 다른 글
[sendmail] domainalias 설정 (0) | 2012.11.20 |
---|---|
total 메모리를 구해보자 (0) | 2012.11.19 |
/etc/hosts 아이피로 sort 하기 (0) | 2012.11.19 |
ping 응답하지 않게 설정 (0) | 2012.11.19 |
tomcat download (0) | 2012.11.19 |
다른 디렉토리에 복사할려면? (0) | 2012.11.16 |
WRITTEN BY
- 김병국
유용했던 자료를 기록해 두었습니다. 도움이 되시길~~~ Welcome! I started this blog as a way to give back to all of the other system administrators who have taught me something in the past. Writing these posts brings me a lot of enjoyment and I hope you fun
받은 트랙백이 없고
,
댓글이 없습니다.