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 does a process mean?
What is pid?
What is grep short for?
How do you know about running processes of a particular user?
What command would users use to see what file one page at a time in UNIX?
what does the command 'wc' do?
what are the different commands used to view the contents of a file?
which command is used to identify the type of the file?
what is the command to print last 8 lines of any text file.
How to copy multiple files and directories into some other directory?
What is the difference between a hard link and a soft link in Unix?
What do chmod, chown, chgrp commands do?