Sep 24, 2008, 3:51 PM
Post #1 of 1
`du -sk $dir1/$file1` produces error
I'm having a problem with the following piece of code in one of my programs:
- @temp = split(/\s+/, `du –sk $dir1/$file1`);
- push(@directorySizes, $temp);
I'm getting the following error for each time the first line is called: "du: cannot access `\226sk': No such file or directory." Everything is working as it's supposed to, I'm getting the correct value for du -sk $dir1/$file1 but it still prints this error for some reason. I've tried running the same command manually from the command line and it turns out fine. Does anyone know why this error message keeps appearing, how do I make it go away?