How would you find the size of a file or directory?



How would you find the size of a file or directory?..

Answer / 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

More Unix Commands Interview Questions

what are the different hardwares available?

1 Answers  


what is the advaantage of each user having its own copy of the shell?

0 Answers   BMC, CNS, DELL, Infosys,


What does awk stand for?

0 Answers  


What is the output of : $ ps-e $ ps-a commands

5 Answers   IBM,


Is grep faster than awk?

0 Answers  






what does the job command do?

4 Answers  


What is grep command in unix with examples?

0 Answers  


how many internal commands is there in UNIX?

3 Answers   TCS, Virtusa,


What is the use of tee command?

0 Answers  


What are filter commands in unix?

0 Answers  


fork in unix ?

4 Answers   BFL,


How to copy multiple files and directories into some other directory?

4 Answers  


Categories