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

c program to display the information of given file similar to givan by the unix or linux command ls -l

2151


Write the syntax for "if" conditionals in linux?

1052


What language is shell scripting?

974


What are zombie processes?

971


What is an inode block?

1000


What is shell geeksforgeeks?

1033


When should shell programming/scripting not be used?

1082


How will you copy a file from one machine to other?

946


What is the difference between break and continue commands?

1038


What is echo $shell?

1009


Where is bash history?

859


What is sed in shell script?

981


Where are cowrie shells found?

962


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

1419


How does shell scripting work?

1055