Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-03-2010, 12:27 PM   #1
Registered: Jun 2008
Posts: 405

Rep: Reputation: 31
How to determine the space left on a tape?

You would think it would be easy to do this (and essential to maximizing and predicting the usage of tapes), but apparently this isn't so.

The program MT(1) actually had some commands that give the block positition (if supported by the drive) from which the remaining space could be deduced (even if you couldn't predict exactly how much space the next archive would take up).

However I'm using MT(1L) which no longer has such commands. Any ideas?


Oh... I just realized that in MT(1L) the L probably stands for "light". Just installed MT(1) which, assuming my drive isn't too stupid to report the current block position, will tell me what I need to know.

Last edited by davidstvz; 05-03-2010 at 12:37 PM.
Old 05-03-2010, 01:14 PM   #2
Senior Member
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
It should be fairly trivial to write a simple bash script or command line that will output the remaining space left on the tape.

set blocksize
set totalB
set currentB
set size=(totalB-currentB)*blocksize
display size
(in psuedocode--- could probably consolidate that to a single although probably to complex to type regularly command line using no variables)

Last edited by rweaver; 05-03-2010 at 01:17 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to determine the tape usage for a streamer? alexandrusa Linux - Software 5 10-01-2008 12:45 PM
Left space on tape ? czezz Solaris / OpenSolaris 9 07-17-2008 10:36 AM
No space left on device even though it has free space? enine Linux - General 8 05-30-2007 05:22 PM
"no space left on device" - But df shows free space! monita Linux - General 7 03-30-2004 02:14 PM
How much free space left on a tape? bfloeagle Linux - General 0 08-07-2001 08:55 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration