Size (Unix)
From Wikipedia, the free encyclopedia
- The correct title of this article is size (Unix). The initial letter is shown capitalized due to technical restrictions.
size is a command line utility originally written for use with the Unix-like operating systems. It processes one or more ELF files and its output are the dimensions (in bytes) of the text, data and unitialized sections, and their total.
Common use:
$ size <option> <filename> ...
Here follows some examples on Solaris (/usr/ccs/bin/size); options and syntax may vary on different Operating Systems:
$ size /usr/ccs/bin/size 9066 + 888 + 356 = 10310
With -f option name and size of each section are printed out, plus their total:
$ size -f /usr/ccs/bin/size 17(.interp) + 636(.hash) + 1440(.dynsym) + 743(.dynstr) + 64(.SUNW_version) + 48(.rela.ex_shared) + 24(.rela.bss) + 336(.rela.plt) + 4760(.text) + 80(.init) + 80(.fini) + 4(.exception_ranges) + 28(.rodata) + 590(.rodata1) + 12(.got) + 388(.plt) + 192(.dynamic) + 40(.ex_shared) + 112(.data) + 140(.data1) + 352(.bss) = 10086
With -F option size and permission flag of each sections are printed out, plus their total:
$ size -F /usr/ccs/bin/size 9066(r-x) + 1244(rwx) = 10470
[edit] See also
Unix command line programs and builtins (more) | |||
File and file system management: | cat | chattr | cd | chmod | chown | chgrp | cp | du | df | file | fsck | ln | ls | lsof | mkdir | mount | mv | pwd | rm | rmdir | split | touch | ||
Process management: | at | chroot | crontab | exit | kill | killall | nice | pgrep | pidof | pkill | ps | sleep | time | top | wait | watch | ||
User Management/Environment: | env | finger | id | mesg | passwd | su | sudo | uname | uptime | w | wall | who | whoami | write | ||
Text processing: | awk | comm | cut | ex | head | iconv | join | less | more | paste | sed | sort | tail | tr | uniq | wc | xargs | ||
Shell programming: | echo | expr | printf | unset | Printing: | lp |
Communications: inetd | netstat | ping | rlogin | traceroute |
Searching: find | grep | strings |
Miscellaneous: banner | bc | cal | man | size | yes |