Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Tuesday, 25 February 2014

TAPES AND DISKS


Please see this page for more information on disks in AIX

dd if= of= bs= 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 - ??
e.g. To write a file to tape use
$ 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"
 # 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
- 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
- copy unixfile to rs6000's floppy disk drive in DOS format. -a option expands certain characters, for certain ascii conversions.
dosdir 
- show list of files on a dos floppy disk. Useful with option -l (long format). Like dos command 'dir'
dosread -a
- copy dos file in floppy disk drive to unix - if UNIXFILE is omitted, it outputs to the screen.
dosdel 
- delete dos file on floppy disk.
dosformat
- format dos floppy disk (High Density)
tar
- Read/Write stuff to archive.
tar cvf /dev/rmt0  # 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