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 are the four fundamental components of every file system on linux?

1685


What does $1 mean in bash?

1099


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

1128


What language is bash?

925


Why do we write bin bash in shell scripts?

1021


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

1004


What is awk in shell script?

1230


What are types of shells?

1028


What is bash used for?

1013


What is a batch file used for?

1083


Is powershell a language?

1052


Is powershell a bash?

1082


What is the use of "$?" Sign in shell script?

1171


What is a shell script? Can you name some of its advantages?

1063


What is the use of break command?

1111