From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,82637e570e3e104c X-Google-Attributes: gidfee84,public From: marek.pola@mailbox.swipnet.se (Marek Pola) Subject: Re: How to tell if tape in drive? Date: 1996/07/01 Message-ID: <4r8smk$7rs@mn5.swip.net>#1/1 X-Deja-AN: 163173273 references: <1996Jun25.103140@malad1.mala.bc.ca> organization: - nntp-posting-user: ef6973175ca49332904493b4eec7540a newsgroups: comp.unix.osf.osf1 In article <1996Jun25.103140@malad1.mala.bc.ca>, dunnett@mala.bc.ca (Malcolm Dunnett) wrote: > I'm trying to determine from within a shell script, whether or not >there is a tape in the tape drive, the idea being that if there is >the script will write some files to the tape, and if not it will just >exit. You can do a "mt stat" and check on the status. I don't remember by heart the number for a tape being mounted, but a little trial-and-error will reveal it for you. Regards Marek