HP-UX가 현재 몇 비트로 작동하는지 알아보기 위해서

getconf KERNEL_BITS
반응형
Posted by She쥐포s
o 쉘도라도 닷 컴
    - 좋은 코딩의 예
    - 스크립트 예제
    - 쉘관련 링크
    - Tip과 Trick 등 여러가지 읽을거리가 많이 있다.

http://www.shelldorado.com
반응형
Posted by She쥐포s

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 2957 - March 11, 2008

                   http://www.ugu.com/sui/ugu/show?tip.today
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Sun 장비의 메모리 확인

Sun 장비의 RAM의 양을 빨리 확인하기 위해서는

/usr/sbin/prtconf | grep Mem

---------------------------------------------------------------------

QUICKLY FINDING SUN MEMORY

To quickly find the amount of RAM a
Sun Machine has:

prtconf | grep Mem

반응형
Posted by She쥐포s

2008. 3. 30. 22:07 Unix

cpio로 파일옮기기

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 2965 - March 19, 2008

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

cpio로 파일 옮기기

한 디렉토리 또는 파일시스템에서 다른 디렉토리 또는 파일시스템으로
옮겨야 할 대량의 파일이 있을 경우 다음의 명령을 이용하라.

# find /old_directory -depth | cpio -pdmv /new_directory

이 명령은 소유자와 권한, 디렉토리 구조를 유지하면서 지정한
old_directory 밑의 모든 파일을 new_directory로 옮길 것이다.

---------------------------------------------------------------------

MOVING FILES WITH CPIO

If you have a multitude of
files to move from one
directory or filesystem to
another, here's a one liner:

# find /old_directory -depth | cpio -pdmv /new_directory

This will move all of the
files under the specified
old_directory to the
new_directory, keeping the
same ownership, permissions,
and directory structure.

반응형
Posted by She쥐포s

2008. 3. 30. 19:58 Unix

man 페이지 매핑

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
                             UNIX GURU UNIVERSE
                                UNIX HOT TIP

                       Unix Tip 2976 - March 30, 2008

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

man 페이지 매핑

Solaris에서 man 페이지를 색인(index)하기 위해서는

1. 색인할 모든 man 페이지를 포함하는 MANPATH 변수를 설정한다.

   Eg.  #> MANPATH=/usr/man:/usr/dt/man:/opt/VRTSvxvm/man; export MANPATH

2. man 페이지를 색인하기 위해 catman 명령어를 사용한다.

   #> catman -w

이제 whatis 명령을 이용하여 명령어가 무엇을 하는지와 'man -k' 명령으로
man 페이지의 키워드를 검색할 수 있다.

------------------------------------------------------------------------

MAPPING MAN

In Solaris, indexing the man pages:

1. Set your MANPATH variable to include all your man pages to be indexed:

    Eg.  #> MANPATH=/usr/man:/usr/dt/man:/opt/VRTSvxvm/man; export MANPATH

2. Use catman command to index the man pages:

    #> catman -w

Now you can use 'whatis' command to know what a command does and
'man -k' commands to search for a keyword in man pages.

반응형
Posted by She쥐포s

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. 17. 13:44 Unix/HP-UX

telnet 접속시 오류

telnet localhost 입력 후 오류처리
- /etc/service 파일에서 포트 확인
- /etc/inetd.conf 파일에 telnet 서비스 확인
- /var/adm/inetd.sec 파일의
    telnet deny
    telnet allow
  부분 확인
- inetd 오동작의 경우
    inetd -c로 inetd 재시작
    inetd -l로 syslog로 로그남김

반응형
Posted by She쥐포s
o 원인 : /etc/passwd 파일의 shell이 잘못 지정된 경우
o 해결 :
ok> boot cdrom -s                             : CDROM의 Single User 모드 부팅
# mount /dev/dsk/c0t0d0s0 /a             : OS의 / 파티션을 /a에 마운트
# cd /a/etc
# TERM=sun
# export TERM
# vi /etc/passwd
적절한 shell 프로그램을 지정
반응형
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
이전버튼 1 2 3 4 5 6 7 8 ··· 16 이전버튼

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

달력

 « |  » 2024.4
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

최근에 올라온 글

최근에 달린 댓글

글 보관함