Simple filesize output terminal

5,473

You can use the stat command

stat -c '%s' filename

See man stat for details and other options

Or, with du

du -b filename
Share:
5,473

Related videos on Youtube

anonymous2
Author by

anonymous2

Updated on September 18, 2022

Comments

  • anonymous2
    anonymous2 over 1 year

    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?

  • anonymous2
    anonymous2 almost 8 years
    I like the stat better: it just gives file size as requested. I will accept it as soon as I am allowed to