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
How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?
What is time_t?
What is the use of the command 'ls -x chapter[1-5]' ?
How can you see the command line history?
Who wrote grep?
Is it inbetween or in between?
Which command is used to kill the last background job?
Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.
Explain mount and unmount command.
What is $0 bash?
How many unix commands are there?
What does the “echo” command do?
Which command is used to delete all files in the current directory and all its sub-directories?
What does touch command do in unix?
Using unix command how to display no of records in oracle?