开发者

capture process cannot access

There is the following line command:

开发者_如何学运维

statdump -zdl %db% > "%ckpdb_dir%"\statdump_%db%.log

the result of the Statdump is sent to the log file, but I would like that if there is some error, for example that the statdump is being used already by another process, and then I get the message "The process cannot access the file because it is being used by anoter process on the screen, but I would like to capture these message in a file.

I tried with:

statdump -zdl %db% > "%ckpdb_dir%"\statdump_%db%.log > ckpdb.log

but is not the solution...

btw there is no error generated when happen this


Try this:

statdump -zdl %db% -o "%ckpdb_dir%\statdump_%db%.log" 2> error.log


You want to redirect stderr somewhere else than stdout like this:

statdump -zdl %db% >"%ckpdb_dir%\statdump_%db%.log" 2>err.log

The last part redirects stderr to the file err.log.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜