The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #1 (permalink)  
Old 10-03-2008
G.K.K G.K.K is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 32
stat command error!!

Hi All,

can anyone please rectify this problem for me...
if i am using stat command in shell scripting it is throwing error that stat command was not found..

how can i replace stat command with other command in unix shell scripting to get the size of the directory... the below is the code for stat command..

size_dir=$(stat -c %s $1) #$1 has the directory name (e.g. /root/kamal)
echo $size_dir

please help me to over come error in this code...

Thanks & advance
kamal