Abbreviating the "mt" command

Story: My sysadmin toolboxTotal Replies: 0
Author Content
Skapare

Mar 31, 2006
8:07 AM EDT
The "mt" command takes the value of an environment variable named TAPE as the name of the tape device it will use. If you have only one tape device, then all you need to do is set that environment variable once at the start of your session, or include it in your shell initialtization.

For sh, bash, and ksh users: export TAPE=/dev/st0

for csh and tcsh users: setenv TAPE /dev/st0

Then you can just omit the -f option and tape name on all your "mt" commands. It's still usable in case you have a 2nd tape device you occasionally use.

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!