The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 08-23-2008
dr46014 dr46014 is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 95
Its line count .
So
wc -l /data/XYZ/Daily_File*.txt | nawk -v OFS=, '{ print $4, $3, $1 }'

How it will find the filesize.Usually the file size is presented by K or G or M in unix and only the numeric value in case of bytes.I want to have KB MB GB Bytes in my CSV file.
Like

Daily_File_Students.txt,1500,10 MB
Daily_File_Teachers.txt,1100,11 MB
Daily_File_Staff.txt,50,10 KB
Daily_File_Fees.txt,112,220 Bytes