To list the file on MB size only
Is there anyway to list the files on size of Megabytes only?
Am using ls -lh always or sometimes du -sh/ch,but they can list them in kb. Say if a files is 724Kbytes, is there any way to print it in MB? Thanks |
Here's a hack; it's not nice, and it doesn't handle files with spaces in it, but you get the idea:
Code:
ls -l | awk '{printf "%s %i %s %s %.3fMB %s %i %s %s\n", $1,$2,$3,$4,$5/1024000,$6,$7,$8,$9}' |
Thanks PWc101 .... It's Great
|
It always rounds up so it isn't very accurate for small files but you could try
Code:
ls -l --block-size=1M |
Quote:
Code:
du -sh *|egrep '^[0-9]+(,[0-9]+)*M.*$' Code:
du -sh *|egrep '^[0-9]+(\.[0-9]+)*M.*$' |
All times are GMT -5. The time now is 12:23 AM. |