'DU' command failing

This is a discussion on 'DU' command failing within the TCL forums in Programming Languages category; Hi All, I have a problem in executing the 'du' command in a tcl shell script. My code is #! <tcl-interpreter path> exec du <directory_path> >& tempfile I tried to redirect both the output and error to a file. When i treid to execute the above program, i got an error "child process exited abnormally". This is happening since the directory contains the sub directories which does not have read permissions. I am not able to redirect the error. Hence the script is terminating abnormally. After viewing through some older posts here, I have also tried by redirecting the error ...

Go Back   Application Development Forum > Programming Languages > TCL

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-25-2008, 08:20 AM
anusha.vempati9@gmail.com
Guest
 
Default 'DU' command failing

Hi All,

I have a problem in executing the 'du' command in a tcl shell script.

My code is

#! <tcl-interpreter path>

exec du <directory_path> >& tempfile

I tried to redirect both the output and error to a file.
When i treid to execute the above program, i got an error "child
process exited abnormally". This is happening since the directory
contains the sub directories which does not have read permissions. I
am not able to redirect the error. Hence the script is terminating
abnormally.

After viewing through some older posts here, I have also tried by
redirecting the error to a shell as follows

set res [exec sh -c {du <directory_path>;exit 0} 2>@ stderr]

But this also didnt help me.

Can you please suggest me a solution.

It would be really useful for me if you can help me in this regard.


Thanks!
Anusha
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 08:59 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.