Can someone expalin the size difference between the two commands :
1. du -ks .
2. ls -laR | awk '{ sum += $5 } END { print sum/1024 }'
- $5 is the 5th column that displays the byte count
I thought that at least the two figures should be close since both are supposed to display the total...
I am currently writing a script that expects input to be keyed in, and I have to verify if the input is numeric or not.
#!/bin/sh
read input
echo $input | awk ' { if ( $0 ~ /[0-9]/ )
printf " input contains numerics only"
else printf " input...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.