The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 10-03-2008
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
try replacing this:
Code:
size_dir=$(stat -c %s $1) #$1 has the directory name (e.g. /root/kamal)

with:
Code:
size_dir=$(/usr/bin/stat -c %s $1) #$1 has the directory name (e.g. /root/kamal)

if this doesn't work either, find where is the stat command present at your system and include its full path