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 |
How can you find out how long the system has been running?
What is the significance of the shebang line in shell scripting?
In a file , how to retrieve the lines which are the multiples of 50 ? like 50,100,150th lines etc.
What are the advantages of shell scripting?
How do I stop script errors?
What is bash command used for?
Why is the use of shell script?
Explain about shebang?
What is the use of a shebang line?
How do I run a shell script in powershell?
What is awk in shell script?
Is shell and terminal the same?