How to view specific file size in HP UX?

Dear,

Can anyone inform me the command to view specific file size in megabyte in hp-ux?

HP-UX still does at KBs.. so you have to do size/1024 to get the size in MBs or size/1024/1024 for GBs.

du and df even give blocks unless -k option is given for kilobytes. A block is 512 bytes, half a kilobyte, traditionally.

du -sk file | awk '{print $1/1024}'
ls -ld file | awk '{print $5/1024/1024}'
1 Like