How to initialize a directory size to a variable??
Answers were Sorted based on User's Feedback
Answer / 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 |
What is echo in shell?
How will you print the login names of all users on a system?
Please anyone suggest atleast 2 good training institutes in Hyderabad, INDIA where i can learn unix shell scripting.
What is sed in shell script?
How would you replace the n character in a file with some xyz?
What is the difference between a variable and value?
What does the sh command do?
What is difference between shell and bash scripting?
How to print pid of the current shell?
What is the command to find out today's date?
What are the two files of crontab command?
Where is bash history?