Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible for me to capture all the output from the tar command i

Status
Not open for further replies.

ChrisPhillips

Programmer
Aug 1, 2000
11
0
0
NL
tar -xvf test.tar >/tmp/tar.log 2>&1

When I use the above command I can capture all output in my log file, but if I run out of disk space then I get the following error displayed on my terminal.

msgcnt 878 vxfs: mesg 001: vx_nospace - /dev/vg01/lvol5 file system full (1 block extent)

Is it possible for me to capture this error messages in my log file and for nothing to be displayed on the screen.
 
Chris,

Without wanting to state the obvious and just tick you off, you need to direct any log files you produce to an area of your system with sufficient space.

Also - you're specifying verbose messages with the v option, miss that out and you'll get far less output.

It's more likely, unless you're *really* short of space on /tmp, that it's the extract process itself that's running out of space. Where are you extracting the files to? Is there sufficient space there? Mike
________________________________________________________________

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Mike,

The drive that I'm writing the log file to has plenty of space, it's the drive where I extract the contents of the tar file that is running out of space. It's this error message that I'd like to capture in my log file.
 
The problem is, this isn't an error message from TAR. I believe this would be an error message from the OS. TAR is designed to only hand a 0 for success or non-zero for failure once it's completed.

Do you only see the "msgcnt 878 vxfs: mesg 001: vx_nospace - /dev/vg01/lvol5 file system full (1 block extent)" error message when you run this manually?

If you run the TAR command as a cron job you should see the error message in the /var/log/messages file?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top