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 #!/ Bin sh do?
How can we use grep command in unix?
What command is used to check the current users?
How does shebang work?
Which command is used to find whether the system is 32 bit or 64 bit?
What do chmod, chown, chgrp commands do?
What is the use of finger command?
What is {} in find command?
What is the difference between grep and grep?
Which command is used to delete all files in the current directory and all its sub-directories?
Explain how to use grep command to list find the records of a file containing 10 different strings?
Explain command to show the space allocation of files?
Which command is used to restrict incoming messages?
How do I clear my terminal history?
What is .sh file?