How would you find the size of a file or directory?
The du command, standing for "disk usage", can be employed to ascertain the size of files and directories. du -sh filename would display the size of a file, while du -sh directory_name reveals the total size of a directory. The -s provides a summary and -h displays sizes in a human-readable format (like KB, MB). It's an invaluable command for monitoring space utilisation and managing storage effectively.
| Is This Answer Correct ? | 0 Yes | 0 No |
what are wild cards?
What are some command words?
What is the significance of the 'tee' command?
How to replace the exact word in vi editor?? suppose a file contains words like amaze,amazed,amazement in some of the line.But i want to replace only 'amaze' with delight but don't wanna replace amazed or amazement. thanks
6 Answers Polaris, Tech Mahindra,
How are UNIX file permissions represented?
what will be the output of ls ~/..
What are the unix commands?
what is shell?
Write a command that will find all text files in a directory such that it does not contain the word "amazing" in any form (that is, it must include the words amazing, amazing, or amazing)?
What is grep and how do you use it?
Is ‘du’ a command? If so, what is its use?
What is $0 bash?