CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
`du -sk $dir1/$file1` produces error


New User

Sep 24, 2008, 3:51 PM

Post #1 of 1 (1212 views)
`du -sk $dir1/$file1` produces error Can't Post

Hi all,

I'm having a problem with the following piece of code in one of my programs:

  1. @temp = split(/\s+/, `du –sk $dir1/$file1`);
  2. push(@directorySizes, $temp[0]);

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?



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives