Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to initialize a directory size to a variable??

Answer Posted / damodar rao

#!/bin/bash
echo 'enter the directory name with path Ex: /home/damoar: ';
read $x;
$size = `du -h $x`;
echo 'size of a given directory $x is : `$size` ';
:wq

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of echo in shell script?

995


Give some situations where typing error can destroy a program?

1228


Tell something about the super block in shell scripting?

1015


What are the different commands available to check the disk usage?

980


What does path stand for?

1045


How to get the last line from a file using just the terminal?

1209


Why are there shells on the beach?

1117


What happens when you type ls?

982


Why is shell scripting important?

1026


What is the equivalent of a file shortcut that we have a window on a linux system?

1106


What are the advantages of using shell scripts?

1049


What does echo mean in scripting?

994


How do I run a shell script on a mac?

1111


What is another name for a bash shell script that you might see?

1462


How can we find the process name from its process id?

1163