Please see this page for more information on disks in AIX
- dd if=<filename or device> of=<filename or device> bs=<Block Size> conv=sync
- - direct (and I mean DIRECT) copy, normally to tape. Archaic syntax and very rarely used. flags:
- if - input filename or device
- of - output filename
- bs - block size
- conv - ??
$ dd if=/etc/hosts of=/dev/rmt0 bs=1024 conv=sync # write hosts file to tape using dd - cpio
- stands for copy in-out, and is extremely powerful if you can cope with the innumerable flags that you have to use(!)
$ cpio -iBcvumd "etc/hosts" </dev/rmt0 # Grab /etc/hosts file from tape
$ find /etc -print | cpio -oBcv >/dev/rmt0 # Write the contents of the /etc directory to tape
$ find /etc -print | cpio -pdumv /usr2/etcbackup/ # copy directory /etc to /usr2/etcbackup and retain all permissions.
meaning of the flags:- i - input
- o - output
- B - Block size of 5120 bytes
- c - read/write header info
- v - list file names
- u - unconditional copy - overwrites existing file.
- m - keep modification dates
- d - creates directories as needed.
- t - generate listing of what is on the tape.
- p - preserve permissions.
- tapeutil -f <devicename> <commands>
- - A program which came with the tape library to control it's working. Called without arguments gives a menu. Is useful for doing things like moving tapes from the slot to the drive. e.g.
$ tapeutil -f /dev/smc0 move -s 10 -d 23 # which moves the tape in slot 10 to the drive (obviously, this will depend on your own individual tape library, may I suggest the manual?). - doswrite -a <unix file> <dos file>
- - copy unixfile to rs6000's floppy disk drive in DOS format. -a option expands certain characters, for certain ascii conversions.
- dosdir <directory>
- - show list of files on a dos floppy disk. Useful with option -l (long format). Like dos command 'dir'
- dosread -a <DOS file> <unix file>
- - copy dos file in floppy disk drive to unix - if UNIXFILE is omitted, it outputs to the screen.
- dosdel <DOS file>
- - delete dos file on floppy disk.
- dosformat
- - format dos floppy disk (High Density)
- tar
- - Read/Write stuff to archive.
tar cvf /dev/rmt0 <filenames> # will write files to tape
tar xvf /dev/rmt0 will read files from tape
tar tvf /dev/rmt0 will give a listing of what's on the tape. If you're using an archive file then replace /dev/rmt0 in the examples above with the name of the archive file.
No comments:
Post a Comment