Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

listing just tar label




>Is it possible to list just the label of a 'tar' tape archive?
>I know I could just do a verbose list and parse out the first
>line, but I'd rather not scan the whole tape.

Try this:

    dd if=/yourTarArchiveFile bs=100 count=1 | strings

or, if you don't wanna see the chatty "dd" output:

  ( dd if=/yourTarArchiveFile bs=100 count=1 | strings ) 2>/dev/null

See also: /usr/include/tar.h

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org