list file size as mb
ls -l --block-size=M
list file size as mb
ls -l --block-size=M
linux file size
cd dir ; du -hsx * | sort -rh | head -20
# example output
# 300MB some_backup_file.log
# 1.8GB some_huge_file.war
get file size in bash
# du is ok but is not accurate
# This is because it returns the disk usage for the target
# rather than the actual file size of the target.
# However, you can get more accurate results using the `--apparent-size` arg
du --apparent-size -h path/to/<file|folder>
# -h is tell it to print in a human readable format
linux command for file size
#Get file size of each folder
du -bsh *
find the size of file in linux
ls -l filename #Displays Size of the specified file
ls -l * #Displays Size of All the files in the current directory
ls -al * #Displays Size of All the files including hidden files in the current directory
ls -al dir/ #Displays Size of All the files including hidden files in the 'dir' directory
get size of file linux
du -h your-file.txt
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us