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 any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?
write a shell script that counts a number of unique word contained in the file and print them in alphabetical order line by line?
Is shell scripting a language?
There is a record with fields namely name,roll no.,salary,grade etc.Now,write a script to create a file with multiple records have same combination of fields but with unique roll numbers.The script should work for different names in the input file.
What are the 4 basics of OOP?
what are command line arguments? what is the need of those?
What is a beat in a script?
What is basename in shell script?
Write a shell program to test whether a given number is even or odd?
What is bash coding?
What is the use of .sh file?
Can shell script run on windows?