Solaris useful commands

Материал из noname.com.ua
Перейти к навигацииПерейти к поиску

Полезные команды (аналоги для linux)

Commnds
Solaris 10 Linux Description
/usr/X11/bin/scanpci lspci
prtconf

http://www.opennet.ru/tips/info/1348.shtml

Работа с пакетами

Solaris: Adding package from CDROM 1) Mount cdrom

2) To add or install GNU tar package from Solaris CD use command

# pkgadd -d /cdrom/cdrom0/Solaris_9/Product SUNWgtar

Where, -d /cdrom/cdrom0/Solaris_9/Product: Specify package directory SUNWgtar: Package name

Solaris: Adding packages to spool directory and then install them 1) Copy package to /var/spool/pkg directory first:

# pkgadd -d /cdrom/cdrom0/Solaris_9/Product -s /var/spool/pkg SUNWgtar

Transferring package instance

Where, -d /cdrom/cdrom0/Solaris_9/Product: Specify package directory -s /var/spool/pkg : Directory in which package will get stored SUNWgtar: Package name

2) Install the packages copied to spool directory

# pkgadd SUNWgtar

Solaris: Install downloaded package 1) If your package is in .bz2 format then first uncompress it using bunzip2 command:

# bunzip2 Packagname.bz2

2) Install package:

# pkgadd –d Packagname

Note .bz2 extension will automatically removed by first command.

For example if your package name is SFWqt.bz2

# buzip2 SFWqt.bz2
# pkgadd –d SFWqt

Работа с пакетами-2 =

Проверка принадлежности файла к пакету

Use the pkgchk command to determine which package a particular file belongs to. The syntax is:

# /usr/sbin/pkgchk -l -p /absolute/path/todir

Пример:

# /usr/sbin/pkgchk -l -p /usr/bin/pgrep
Pathname: /usr/bin/pgrep
Type: regular file
Expected mode: 0555
Expected owner: root
Expected group: bin
Expected file size (bytes): 14688
Expected sum(1) of contents: 63968
Expected last modification: Mar 16 05:53:45 AM 2000
Referenced by the following packages:
        SUNWcsu
Current status: installed

То же самое можно сделать проще:

# grep /usr/bin/pgrep /var/sadm/install/contents
/usr/bin/pgrep f none 0555 root bin 14688 63968 953204025 SUNWcsu

Ссылки