Tanti Technology

My photo
Bangalore, karnataka, India
Sandeep Kumar | Founder, Tanti Technologies At Tanti Technologies, I share practical knowledge, hands-on tutorials, and real-world solutions across Python, SQL, Docker, Kubernetes, CI/CD, AWS, Azure, Machine Learning, Generative AI, and Agentic AI. My mission is to simplify complex technologies and provide actionable insights that help developers, engineers, and businesses learn faster, build better, automate smarter, and innovate with confidence. 🚀 Learn • Build • Automate • Innovate Follow Tanti Technologies for practical technology insights and next-generation AI solutions.

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