How do you store the total size of c source file in unix?

Answer:
du command can be used to find the size of the file.

$ file_size=`du -s shift.c | cut -f1`

$ echo $file_size
4
First answer by PrasadJoshi124. Last edit by PrasadJoshi124. Contributor trust: 0 [recommend contributor recommended]. Question popularity: 2 [recommend question].