How would you find the size of a file or directory?
Answer Posted / hr@tgksolutions.com
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 |
Post New Answer View All Answers
What does the metacharacter mean?
What is the functionality of a top command?
What is the nmap command?
What difference between cmp and diff commands?
How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?
What is the use of finger command?
How do I delete files from command prompt?
What command is used to check the current users?
Is grep faster than awk?
What is time_t?
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 the use of egrep command in unix?
What command is used to switching between users in unix?
What is the difference between grep and grep?
Enumerate some of the most commonly used network commands in unix?