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 |
How to redirect standard error to a file?
what is the use of wild cards?
what are the uses of filters?
what is the use of "fg" command ?
Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?
How do you move or rename a file or directory?
what is the use of nice command?
what is the command to list files in a directory in UNIX?
how to make IGNITE-BACKUP in HP-UX?
what is the use of "grep" command?
29. How to display top 10 users Who | head -10 | wc –w
Which command is used to kill the last background job?