1.1
,
root
1.2
1.3
CD-ROM
CD-ROM)
DDS)
4 QLC)
UNIX
UNIX
,
1.4
,
...
/etc/passwd
/etc/group
1.1
/usr/bin/id ID ID
1.2
ID /etc/passwd
/etc/group
/home
useradduserdel usermod vi
1.3 /etc/passwd
/etc/passwd
1 8
8 8
passwd
6 8
ID ID ID 0 root
UID 1-99
ID ID GID/etc/group
ID
finger
Home
shell
shell shell /user/bin/sh/usr/bin/ksh/usr/bin/csh
/usr/bin/sh shell/etc/passwd
date:rc70x.4.hgjdc:20:1::/:/usr/bin/date
/usr/bin/date date
/bin/date
/etc/paswd
vi /etc/passwd
/etc/passwd vipw
$ vipw
/etc/passwd
/usr/sbin/pwck /etc/passwd
ID ID
1.4 /etc/group
/etc/group
ls -l
ID IDGID/etc/passwd ID
ID 100
unix ,
/etc/group /etc/passwd
/etc/group
newgrp
$newgrp group_name
/etc/passwd
newgrp
newgrp /etc/passwd
/usr/sbin/grpck /etc/group
/etc/passwd
1.5
useradd,usermod,userdel
groupadd,groupmod,groupdel
useradd [ -u uid [-o]] [-g group] [-G group [group]] [-d dir] [-s shell]
-o UID-m home
useradd
useradd D
useradd D g others
userdel
userdel r login
-r home
groupadd
groupadd economics
1.6
passwd
shell
passwd
6 6 6
passwd
min max -f
fontana
passwd -n 7 -x 35 fontana
buddy
passwd f buddy
PATH
/etc/skel
PATH
/etc/passwd /etc/group
PATH shell
export TERM='vt100'
export LPDEST='laser'
export PATH=$PATH:/usr/local/bin
export EDITOR=vi
export HISTSIZE=40
export HISTFILE=~/.sh_history
TERM
TERM TERM
/usr/lib/terminfo/*
TERM
ttytype
if [ "$TERM = "" -0 \
"#TERM" = "unknown" -o \
"#TERM" = "dialup" -o \
"#TERM" = "network" ]
then
fi
export TERM
PS1
LPDEST
LPDEST LPDEST
export LPDEST=laser
export LPDEST=printera
PATH
shell PATH
shell
PATH
PATH
EDITOR
export EDITOR=vi
export HISTFILE=~/.sh_history
export HISTSIZE=50
POSIX shell
shell
POSIX shell shell
Shell
1. shell
Bourne(/usr/old/bin/sh) /etc/profile
korn(/usr/bin/ksh) /etc/profile
POSIX(/usr/bin/sh) /etc/profile
shell(/usr/bin/rshr,/usr/bin/rksh /etc/profile
C (/usr/bin/csh) /etc/csh.login
PATH,TZ,TERM
/etc/PATH,/etc/MANPATH,/etc/TIMEZONE,/etc/SHLIB_PATH
2. /etc/copyright /etc/motd
3.
news:news_filename
4. shell home
Bourne(/usr/old/bin/sh .profile
Korn(/usr/bin/ksh) .profile
POSIX(/usr/bin/sh .profile
shell/usr/bin/rsh,/usr/bin/rksh .profile
C (/usr/bin/csh) .login
useradd
/etc/skel/.profile) home
POSIX,Korn, C shells
shell
/etc/skel
useradd
home /etc/skel
/etc/skel/.profile #ksh/posix
/etc/skel/.login #csh
/etc/skel/.cshrc #csh
/etc/skel/.exrc #vi
home /etc/skel
/etc/skel home
home
/etc/skel
/sbin,/usr,/stand,/etc,/dev,/var(
/opt,/etc/opt,/var/opt
find whereis
AT&T SVR4
/usr,/sbin
/opt
/usr,/sbin /opt
/usr
/sbin
/opt
/etc
/dev
/var
/mnt
/tmp
/stand
/home
/usr
/usr /usr
ASCII
/usr
/usr/bin
/usr/conf
/usr/contrib
/usr/lbin
/usr/local
/usr/newconfig
/usr/sbin
/usr/share
/usr/share/man
/usr/share/doc
/var
/var /var
/var /var/adm
/var crontabs
/var /var
/var
/var/adm
/var/adm/crash dump
/var/mail
/var/opt/
/var/spool lp,cron
/var/tmp /usr
/var/adm
syslog cron
dump
/var/adm/crash dump
/var/adm/cron cron
/var/adm/sw
/var/adm/syslog syslog
syslog /etc/syslog.conf
/var/adm/syslog/syslog.log OLDsyslog.log,
syslog.log ASCII
/var/adm/utmp write,who
ASCII
/opt,/etc/opt,/var/opt
/opt/application
/opt/application/bin
/opt/application/share/man
/opt/application/lib
/opt/application/lbin
/opt/application/newconfig
/var/opt/application
/etc/opt/application
find
whereis
which PATH
file
UNIX
find
find
find
grep
/tmp 7
whereis
whereis
whereis -b
# whereis -b ls
which
which home
PATH
file
file
shell
# file /sbin/shutdown
# file /sbin/rc
strings
strings
lsdev
ls -l
ioscan
issf
CD
modern
autoconfig
insf
1.
modern)
unix
UNIX
UNIX
/dev
UNIX
UNIX
echo
ls -l
ls -l /dev
/dev ls -l
ls -l
2.
c"
modern
raw
b
buffer
CD-ROMS I/O
moderms
CD-ROMS
ls -l
UNIX
unix
lsdev
24
ioscan
# ioscan -fun
ls -l
ioscan -fun
ioscan -fun
ioscan
ioscan -fun
lssf
# lssf /dev/rdsk/clt6d0
# lssf /dev/rmt/0mn
ioscan lssf
lssf
3./dev
/dev modermlan
/dev/dsk
/dev/rdsk
/dev/rmt
ioscan -f I"
CD ROM "C"ioscan
C0" SCSI
"0"
ioscan fun
SCSI
t# SCSI SCSI
DIP SCSI
SCSI ioscan 8/12.3.0
SCSI 38/12.6.0 SCSI 6
SCSI
LUN
SCSI LUN 0 SCSI LUN
CD-ROM
/dev/dsk
/dev/rdsk
4.
insf
mksf
mknod
insf
insf
,initrc /etc/ioconfig
io_treeioinit insfinsf /etc/ioconfig
LVM
HP-UX
LVM)
LVM
LVM
root 2M
(
LVM
LVM LVM
LVM
LVM
LVM LVM
/dev/vg00
/dev/vg01
/dev/vg02....
vg00 "root
LVM
/dev/vg01/lvol1
/dev/vg01/lvol2
/dev/vg01/lvol3 etc
LVM
/dev/dsk/c0t5d0 # SCSI 5
/dev/rdsk/c0t5d0 # SCSI 5
/dev
/dev/vg01 # vg01
/dev/vg01/group #vg01
/dev/vg01/lvol1 #lvol 1
/dev/vg01/rlvol1 #lvol1"
LVM
LVM 64 LVM
/dev/vg0/lvol2
#:64
#:0x010002
LVM 64
01, vg01
lvol2
vg02
2.
3.
4. /dev/vg02
5.
LVM extents
LVM
PE LE extent
4M
1. extent 88MB
extent
2. extent 400MB
extent
pvcreate /dev/rdsk/c0t3d0
pvcreate /dev/rdsk/c0t4d0
ioscan
mediainit
mediainit
mediainit
# mediainit /dev/rdsk/c0t3d0
# mediainit /dev/rdsk/c0t4d0
pvcreate LVM
-f
# pvcreate -f /dev/rdsk/c0t3d0
# pvcreate -f /dev/rdsk/c0t4d0
LVM
LVM
BBRA)
LVM
: mkdir /dev/vg01
: vgdisplay -v vg01
pvdisplay -v /dev/dsk/c0t3d0
pvdisplay -v /dev/dsk/c0t4d0
LVM
/dev/vgnn nn
/dev/vg00
01
mkdir /dev/vg01
0xhh0000
hh
01 group ,
vgcreate
vgcreate
-p max_physical_vols LVM 16
vgdisplay pvdisplay
: vgdispaly -v vg01
lvdisplay -v /dev/vg01/myswap
lvcreate
lvcreate
/dev/vgnn lvcreate
-l logical_extents_number extent 0
-n name
/dev/vg01
lvcreate /dev/vg01
10 extents
lvcreate -l 10 /dev/vg01
100M
/etc/fstab
extent
1.
2.
mkdir /myfs1
3.
4./etc/fstab
inode metadata
newfs /dev/vg01/rmyfs1
vxfs
newfs metadata
/etc/fstab
/etc/fstab
/etc/fstab
mount df
newfs
inode
metadata newfs
/dev/vg01/rmyfs1 vxfs -F
vxfs vxfsnewfs
HP-UX10.20
128GB
2GB
/dev/vg01/rmyfs2 HFS
newfs
LVM
-R
mkdir /myfs1
mount -v
# mkdir /myfs1 #
: mount newfs
/,/usr/tmp
/home
mount -v
#mount -v
df -k
umount
umount /dev/vg01/myfs1
umount /myfs1
umount
: umount"unmount"
umount
-a
-F FStype
-v FStype
umountall umount -a
fuser
-c
# fuser -u /dev/vg01/myfs1
/dev/vg01/lvol1 ID
#fuser -u /etc/passwd
passwd ID
/opt ID
lvol1 KILL ID
umount -a
shutdown
root
/etc/fstab
mount -a mountall ,
/etc/fstab
/etc/fstab /sbin/init.d/localmount
mount -a /etc/fatab
/etc/fstab mount
# mount -a #/etc/fstab
CD-ROM
CD CD
CDFS
1.
2.
3. mount CDFS
CDFS
1.CD-ROM
2. CD.
CD-ROMs
CD-ROM
/cdrom).
# mkdir /cdrom #
CDFS /etc/fstab
CD-ROM
sync
fsck
UNIX
fsck
dirty SYNC
clean"
metadata
metadata sync
rm myfile
1.myfile
2. myfile inode
3. inode
4. inode
metadata
metadata
myfile inode
inode inode metadata
inode
I/O
I/O
UNIX UNIX
I/O
sync
syncer
syncer
syncer
syncer
syncer[seconds]
sync
syncer
syncer /sbin/init.d/syncer
syncer
/sbin/init.d/syncer
sync
sync sync
inode I/O
sync syncer
fsck
fsck?
metadata
metadata
fsck
fsck
fsck
fsck
/dev/vg01/myfs2 fsck
1.mount -v
2.umount /dev/vg01/myfs2
4 mount /dev/vg01/myfs2
5.
fsck
fsck
fsck
1.mount -v
fsck
2. umount /dev/vg01/myfs1
umount /dev/vg01/myfs2
fsck .
fsck
fsck
yesfsck nofsck
"yes"
4. mount /dev/vg01/myfs1
mount /dev/vg01/myfs2
fsck
5.
fsck lost+found
lost+found
lost+found
fsck
fsck
file
SCCS what SCCS
SCCS strings
lost+found
# cd /myfs2/lost+found
# ls -l \#1743
# file /#1743
# strings \#1743
df du
core
/var
1.
df
# df -k
# du -sk /myfs2/*
844 /myfs2/data1
1327 /myfs2/data2
1073 /myfs2/data3
10757 /myfs2/data4
4 /myfs2/lost+found
df
Filesystem
Kbytes k)
used
avail
capacity
Mounted on
-i
iused inode
ifree inode
%used inode
du
du 512 block
-k k
-s
2.
trim)
core
core
/var /var
wtmp btmp
# > /var/adm/btmp
# > /var/adm/wtmp
cron
# rm logfile
# touch logfile
core
core QUIT
core
core
core
cron core
100,
extends extents
extents
3.
pvcreate
LVM vgextend
c0t5d0 vg01
# pvcreate /dev/rdsk/c0t5d0
vgextend
pvdisplay vgdisplay
vgdisplay
-v pvdisplay "VG Name"
4.
extents
lvextend
# lvdisplay -v /dev/vg01/myfs2
5.
metadata
HFS
/dev/vg01/myfs2 32MB)
# umount /myfs2
# mount /myfs2
# df /myfs2
/dev/vg01/myfs2 /myfs2
(/dev/vg01/myfs2 32MB)
# umount /myfs2
# mount /myfs2
# df /myfs2
/dev/vg01/myfs2 /myfs2
/dev/vg01/myfs2 32MB)
# df /myfs1
11.1
RAM
unlockable_mem
dmesg
11.2
RAM
RAM
lotsfree
vhand
page out ,
page fault RAM
swapper)
unix
I/O
(
minfree),
minfree
11.3
root
root
newfs -R
200M
LVM
lvcreate 200M
/paging
2M
root
11.4
1 swapon /dev/vg01/myswap
2 swapon /dev/dsk/c0t2d0
3 swapon p 4 l 4M /myfs2
4 swapon a
1
2
4 /etc/fstab
swapon(1m)
/dev/vg01/myswap
/myfs2 -p
4-l vhand 4M
umount
/etc/fstab /etc/fstab
swapon a /etc/fstab
swapon
priority
-e -f
-f
device
/usr/sbin/swapon [-m min] [-l limit] [-r reserve] [-p priority] directory
-m min min
-r reserve
-p priority
directory
paging
unmount
512M
maxswapchunks 512M chunk
chunk 2MBswapchunk swchunk
/stand/system nswapdev
10 25 nswapdev
nswapfs 10 25
11.5 /etc/fstab
/etc/fstab
/etc/fstab
swapon a /etc/fstab Swapon a
/sbin/init.d/swap_start
11.6
swapinfo
swapinfo f
swapinfo d
swapinfo tm
swapinfo
11.7
newfs -R
LVM()
0 10
swapon -p 1
11.8
root
bdf
UNIX
UNIX
UNIX
UNIX
UNIX
PDL)
UNIX
UNIX
shell
UNIX
ROM
0 0 1
ROM
UNIX
0 0 1
CPU
UNIX
UNIX
)
UNIX UNIX /unix /vmunix,
boot:
UNIX
UNIX
proc
AT&T systerm V
sched(0
init(1
pageout(2
fsflush(3
Rmdaemon(4
BSD
swapper0
init1
pagedaemon(2
012
1 init
init
getty
shell
daemon)
init shell
getty getty
getty
login shell
getty
init /etc/inittab
getty
init init
shell shell
shell
/bin /etc
fsck
10
UNIX
shell
init
UNIX
UNIX init 1
# kill -9 1
AT&T UNIX
shutdown -y
shutdown
60
shutdown
tar
find cpio
tar, cpio
/dev/rmt/0m 9 DDS
/dev/rmt/c0t3d0BEST 9 DDS
tar
cpio
UNIX
9 DDS
;
2 tar
tar
key argument
key
c create
v verbose)
f file
/dev/rmt/0m
3 cpio
cpio o [cvx]
cpio i [cdmtuvx]
-o
-i
cpio o
find cpio
cpio i
-o,-i
-o -i
-c -c ASCII -o -i
-d
-m
-t
-u
-v -v
-x -x
find
find find
(find .)find /home/user3
expression man
cron
cron
root cron
13.1 cron
cron
cron
cron
ps cron
*.allow *.deny
*.allow
*.deny
13.2 cronfile
cronfile cron
tabs
shell
cron /usr/bin/sh
PATH.
cron
630.
630
630
cron /var/spool/cron/crontabs
cronfile crontab
/var/spool/cron/crontabs crontab
crontab cron
crontab e cron vi
cron cron
crontab r cron
crontab l cron
13.4
cron cron
/var/adm/cron/cron.allow
/var/adm/cron/cron.deny cron
cron /var/adm/cron/log
cron
/var/spool/cron/crontabs ls cat
cron cron
crontab