How to force ls terminal command to show results in Bytes while I have set the default to ls -h in bash profile?
Is there other command I can use to get file size?
Use one of the following:
wc -c file
-c
prints the byte count.
\ls -ln file
\
escapes the ls
alias.
Linux:
stat --format="%s" file
OS X:
stat -f "%z bytes" file
See Stack Overflow question Portable way to get file size (in bytes) in shell? for other alternatives.