cat /dev/null > /dev/rmt0 dangerous?

cat /dev/null > /dev/rmt0 dangerous?

Post by Frank Eickho » Thu, 09 Dec 1993 02:43:01




hi.

 > We have this scsci-tapedrive here, and I needed to rewind my
 > tape
 > automatically in a script. (I haven't compiled mt yet..)
 > Now, when I use cat /dev/null > /dev/rmt0, will that do any harm
 > to
 > the data on the tape? (I guess it will, if it's in the middle of
 > a
 > f.x. a tar-file).

 > Is there any better way to do this in an 'easy' way with the
 > standard
 > utils or commands?
i don't know, but in a lot of unix-derivaten is a command mt
mt -f /dev/rmt0 rewind will rewind your tape.
i think in linux will be a command like this also.

 > //jornj

 > --- FIDOGATE 3.3rel
 >  * Origin: *** MITROPA BBS ***   LinuxServer   [+49 203 482319]
 > (2:245/126.0)

so long
frank

 
 
 

cat /dev/null > /dev/rmt0 dangerous?

Post by KZU.. » Fri, 10 Dec 1993 06:47:10





>hi.

> > We have this scsci-tapedrive here, and I needed to rewind my
> > tape
> > automatically in a script. (I haven't compiled mt yet..)<========|
> > Now, when I use cat /dev/null > /dev/rmt0, will that do any harm |
> > to                                                               |
> > the data on the tape? (I guess it will, if it's in the middle of |
> > Is there any better way to do this in an 'easy' way with the     |
> > utils or commands?                                               |
>i don't know, but in a lot of unix-derivaten is a command mt        |
>mt -f /dev/rmt0 rewind will rewind your tape.                       |
>i think in linux will be a command like this also.                  |
>so long                                                             |
>frank                                                               |
>                                                                    |

             =========================================================
             |
 Could we please at least read the article before we post an answer.

Unless another person has a solution to this guys problem, I can't see
anything other than what he mentioned except to compile mt first and then
rewind the tape.

-------------------------------------------------------------------------
|  L    IIIII NN   N U   U X   X     Having Problems? Be sure to pick   |
|  L      I   N N  N U   U  X X      up the new book 'Linux Installation|
|  L      I   N  N N U   U   X       and Getting Started' by Matt Welsh |
|  L    IIIII N   NN  UUU   X X      Available at tsx-11.mit.edu in     |
|  LLLLL                   X   X     /pub/linux/docs/LDP and other sites|
|                                     -Kevin Zupan                      |

-------------------------------------------------------------------------

 
 
 

cat /dev/null > /dev/rmt0 dangerous?

Post by David L. Cra » Fri, 10 Dec 1993 22:23:27




Quote:>In the meantime, it's probably a lot safer and just as effective to do the cat
>the other way:

>    cat < /dev/rmt0 > /dev/null 2>&1

Easier still to use

        : < /dev/rmt0

under Bourne-compatible shells.  Only positioning occurs, no reading.

 
 
 

cat /dev/null > /dev/rmt0 dangerous?

Post by Kees J. B » Fri, 10 Dec 1993 22:10:51



Quote:

>He should compile and install mt.

>In the meantime, it's probably a lot safer and just as effective to do the cat
>the other way:

>    cat < /dev/rmt0 > /dev/null 2>&1

>(the redirect of stderr is because you may get an error because it's at the
>end of the data on the tape)

It can be done much simpler.  If it is indeed a "rewind-on-close" device
then that is what you do, you open it and then you close it:

        < /dev/rmt0

Doesn't even require a command under a real shell, athough you may use
':' if you are superstitious.  There are no errors to be expected either,
just tape drive noise.
--

                      Systems Programmer, Vrije Universiteit Amsterdam

 
 
 

1. cat /dev/null > /dev/rmt0 dangerous?

We have this scsci-tapedrive here, and I needed to rewind my tape
automatically in a script. (I haven't compiled mt yet..)
Now, when I use cat /dev/null > /dev/rmt0, will that do any harm to
the data on the tape? (I guess it will, if it's in the middle of a
f.x. a tar-file).

Is there any better way to do this in an 'easy' way with the standard
utils or commands?

//jornj

2. MATROX PCIMGAII problems

3. HELP: 2>&1 > /dev/null != 2>&- > /dev/null ???

4. network unreachable by ping

5. cp /dev/null or cat /dev/null

6. Security in the IRC

7. Solaris 8 box: cat file | rsh solaris_2.6_box "cat > /dev/null" SLOW

8. kmod & modprobe-scripts

9. rsh machine -n 'command >&/dev/null </dev/null &'

10. >/dev/msglog 2<>/dev/msglog </dev/console

11. cat file > /dev/cua1 vs. cp file /dev/cual ?

12. >/dev/msglog 2<>/dev/msglog </dev/console

13. cat /dev/mouse > /dev/audio... Newbie Help