![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| filesize | infyanurag | Shell Programming and Scripting | 3 | 05-15-2008 02:00 AM |
| UNIX and filesize | ndoggy020 | UNIX for Dummies Questions & Answers | 3 | 12-06-2007 01:14 PM |
| How to truncate as filesize? | Lestat | Shell Programming and Scripting | 1 | 06-07-2005 12:24 PM |
| Sorting ls by filesize | peter.herlihy | UNIX for Dummies Questions & Answers | 2 | 06-04-2002 05:40 PM |
| FileSize ??? | Cameron | Shell Programming and Scripting | 3 | 05-28-2002 07:34 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
filesize
I know in php if you use the function filesize it will return the size of the file in bytes, but is there an easy way to get the size in MB.
Cheers |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Write you own php function called myfilesize:
pseudo code: function myfilesize($fname) { return filesize($fname/(1024*1024)); } i.e. divide it by 1024 twice! Best Wishes!
__________________
FreeBSD: The best free Unix on this planet IMHO!! FreeBSD Forums www.freebsdforums.org |
|
#3
|
|||
|
|||
|
thanks
Thanks a million,
but I managed to get around it by using substr. Thanks again John |
|||
| Google The UNIX and Linux Forums |