Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Is there a simple command in the terminal (or a command with a usage that I know not) that would output filesize in bytes of a file given a filename parameter?
You can use the stat command
stat -c '%s' filename
See man stat for details and other options
Or, with du
du -b filename
Required, but never shown