1. Using ‘du -sh’ command Syntax Example Find the size of the file. Find the size of the directory. Find the size of all files in a dictionary. 2. Using ‘stat’ command…
Tag: file
How to read a file in python?
Using open method: We open files with the open method and read file contents using the read method. Note: With context handles the closing of the file is done automatically so you don’t…