Vous êtes sur la page 1sur 2

AIX Tape Utility Commands

tapeutil To run the menu version

/dev/rmt0 = Tape drive

/dev/smc0 = Tape library

lsdev -Cc tape List the devices

tapeutil -f /dev/rmt0 mount 2 To mount tape from slot 2

tapeutil -f /dev/rmt0 unmount 2 To unmount tape from slot 2

restore -Tvqf /dev/rmt0 > file To list information on a tape saved with backup or savevg

tar tvf /dev/rmt0 > file To list information on a tape saved with tar

tcl -f /dev/rmt0.1 fsf 3; restore -Tvqf /dev/rmt0 > file To list information on a tape saved
with mksysb

lsattr -l rmt0 -E To list the current values of the attributes for the tape device, rmt0

AIX script Commands

Script to compare condition with "or" "and" condition


o condition1= $(ls -la | /tmp/file2.txt | wc -l)
o condition2 = $(ls -la | /tmp/file2.txt | wc -l)
o if [ "$condition1" = "1" ] || [ "$condition2" = "2" ] then echo "ok 1 or 2 is accepted" else
echo "error only 1 or 2 is accepted"
o if [ "$condition1" = "1" ] && [ "$conditions2" = "2" ] then echo "ok 1 and 2 is accepted"
else echo "error only 1 and 2 is accepted"

File Transfer Protocol (ftp)

ftp://user:password@machine/../../directory Url of an ftp ressource

Server X

Start a server x
o ps -ef | dtlogin (identifiy all the process dtlogin)
o kill <PID> (kill the process from the result of the ps command)
o cd /etc
o sh rc.dt (Start the server X)

CD-ROM - DVD-ROM

CD-ROM utility
o cdromd Automatically mounts a CD-ROM or DVD-ROM when it is inserted (man cdromd
for more details)
o cdeject Eject a media from a CD drive managed by the cdromd daemon
o cdumount Unmounts a previously mounted file system on a device managed by
cdromd
o cdmount Make a file system available for user on a device managed by cdromd
o mount -V cdrfs -o ro /dev/cd0 /cdrom Mount a cd-rom