2008. 3. 15. 21:45 Unix

빈줄지우기

빈 줄 지우기

텍스트 파일에서 빈 줄을 지우려면 다음과 같이 하라.

sed '/^$/d' <text_file>
awk 'NF>0' <text_file>
반응형
Posted by She쥐포s

원격으로 필수데이터 백업

원격으로 백업해야할 워크스테이션이나 서버상에는 프로그램, 데이터 파일,
특히 라이센스파일들이 많이 있다.

시스템 전체를 백업하는 것은 네트웍에 부하를 주게되므로 백업되어야할
최소의 필수데이터를 확인해야 한다.

예를 들자면

/var/flexlm
/usr/local/flexlm
/var/netls
/var/license
/etc/passwd
/etc/hosts
/etc/groups
/etc/netgroups
/etc/shadow
/vmunix
/kernel

등등....

==================================================================
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 2328 - May 17, 2005

                   http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BACKUP THE REMOTE ESSENTIALS

There are many programs, data files, and especially
license files that sit out on remote workstations
and servers that you may should be backing up
remotely.

If backing up the entire system puts a strain
on your network, make sure that all the  essential
files at least get backed up.

Some files may be
/var/flexlm
/usr/local/flexlm
/var/netls
/var/license
/etc/passwd
/etc/hosts
/etc/groups
/etc/netgroups
/etc/shadow
/vmunix
/kernel
etc....

반응형
Posted by She쥐포s

2008. 1. 5. 20:14 Unix

NIS+에서 주의사항

NIS+에서 주의사항

/etc/passwd 파일을 rebuild하기 위해서는 다음 명령을 사용하라.

    # nisaddent -rv -f /etc/passwd passwd

그러나 위의 명령어를 실행한다면 다음 명령을 shadow 파일에 대해서도
실행해야 한다.

    # nisaddent -mv -f /etc/shadow shadow

/etc/shadow 파일에 대해 "nisaddent -rv -f" 명령을 사용하지 말아라.
이 명령은 복제 서버를 혼동하고 시스템의 모든 사용자에 대해 lock을  걸 것이다.

********************************<원문>********************************
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 2528 - January  5, 2008

                   http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BE CAREFUL WITH NIS+

To rebuild your /etc/passwd file use:
    nisaddent -rv -f /etc/passwd passwd

HOWEVER, if you perform the above command
you must perform the following command on
the shadow file:
    nisaddent -mv -f /etc/shadow shadow

DO NOT USE the nisaddent -rv -f command on
the /etc/shadow file, this command will confuse
replica servers and lock everyone off of a system.
반응형
Posted by She쥐포s
혹시나 개인적으로 메일링 리스트에 가입하고자 하는 분들을 위해 URL을 적어본다.

가입을 하게되면 보통 하루에 하나씩 Unix Tip을 보내준다.
영어 실력이 된다면 개인의 팁을 보내는 것도 해볼만하다.

이 사이트는 2000년정도에 hanIRC Linux 채널의 chaeplin님께서 소개해준 사이트다.

홈페이지인 http://www.ugu.com/ 에 가보면 읽어볼만한 내용들이 많이 있다.

구독신청 : http://www.ugu.com/sui/ugu/show?tip.subscribe
구독해제 : http://www.ugu.com/sui/ugu/show?tip.unsubscribe
팁보내기 : http://www.ugu.com/sui/ugu/show?tip.today
반응형
Posted by She쥐포s

2007. 12. 27. 21:17 Unix

[UnixTip] 패스워드 백업

패스워드 백업

/etc/passwd 파일을 백업했다고 괜찮을 것이라고 생각하지 마라.

안전을 위해서는 다음의 파일 모두를 백업해야 한다.

/etc/passwd
/etc/group
/etc/gshadow (모든 Unix 기종에 있는 것은 아님)
/etc/shadow

시스템의 모든 설정에 대한 백업을 안전하기를(완벽하기를) 원한다면
/etc 밑의 모든 것에 대해 백업하라.(의역)

일반적으로 5MB미만이다.

<원문>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 2883 - December 26, 2007

                   http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


BACKING UP PASSWORDS

Don't just think if you backup
/etc/passwd you'll be ok.

You should backup all the following
to be safe:

/etc/passwd
/etc/group
/etc/gshadow (not on all flavors)
/etc/shadow

If you really want to be safe
about backing up all your system
configurations make sure to get
everything under /etc
It typically is under 5 megabytes.
반응형
Posted by She쥐포s
# isainfo -b

또는

# isainfo -kv

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 2876 - December 19, 2007

                   http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


SOLARIS KERNEL BIT

There is a quick way to findout the Solaris
kernel bit, use isainfo -b

example:
# isainfo -b
64
반응형
Posted by She쥐포s

2007. 12. 7. 10:56 Unix/HP-UX

ls -Rlq /tmp

o /tmp 파일 시스템에 파일이 없는데 100%를 사용중일 때 확인해 볼 수 있는 명령

# ls -Rlq /tmp
    -q : List nonprinting characters in file names as the character
    파일명에 출력되지 않는 글자가 있는 파일 출력

# fuser -cu /dev/vg00/lvol4 (해당 Filesystem의 lvol명)
    -c : 마운트 포인트 및 마운트 포인트 아래에 있는 파일의 사용내역을 출력
    -u : 프로세스 아이디와 (로그인명)을 출력
    -k : file을 사용하고 있는 프로세스에 SIGKILL 신호를 보냄.
    -f : 파일을 사용내역 출력(기본값)

반응형
Posted by She쥐포s

2007. 12. 5. 19:02 Unix/HP-UX

RTFM ㅡ.ㅡ

음냐뤼... 결국은 RTFM이구먼...
Brain Dump를 보고서 man page와 비교를 해보니..
그!대!로! ㅡ.ㅡ

원론적인 이야기지만... RTFM합시다.
아직도 RTFM이 뭔지 모르신다고?

Read the F*cking Manual!!

갑자기 HP-UX 교육을 갔을 때 강사님께서 해주신 말이 떠오르네..
문서를 잘 읽어라...
(줸장.. 영어랑 친하면 그렇게 하겠지만.. 보통사람이 그런건 힘든일...)

반응형
Posted by She쥐포s

o 기술적 tip과 몇몇 tool에 대한 설명
http://www.unixwiz.net/
    - http://www.unixwiz.net/techtips/
    - http://www.unixwiz.net/tools/

반응형
Posted by She쥐포s

o Developer Tutorials(각종 참고 문서와 Tip들, 영문 ㅡ.ㅡ)

http://www.developertutorials.com/

반응형
Posted by She쥐포s
이전버튼 1 2 3 4 이전버튼

블로그 이미지
She쥐포s
Yesterday
Today
Total

달력

 « |  » 2024.3
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

최근에 올라온 글

최근에 달린 댓글

글 보관함