filesize

total size of group of files selected with 'find'

一个人想着一个人 提交于 2019-12-28 08:07:23
问题 For instance, I have a large filesystem that is filling up faster than I expected. So I look for what's being added: find /rapidly_shrinking_drive/ -type f -mtime -1 -ls | less And I find, well, lots of stuff. Thousands of files of six-seven types. I can single out a type and count them: find /rapidly_shrinking_drive/ -name "*offender1*" -mtime -1 -ls | wc -l but what I'd really like is to be able to get the total size on disk of these files: find /rapidly_shrinking_drive/ -name "*offender1*"

PHP include(): File size & performance

六眼飞鱼酱① 提交于 2019-12-28 03:39:10
问题 An inexperienced PHP question: I've got a PHP script file that I need to include on different pages lots of times in lots of places. I have the option of either breaking the included file down into several smaller files and include these on a as-needed basis... OR ... I could just keep it all together in a single PHP file. I'm wondering if there's any performance impact of using a larger vs. smaller file for include() in this context? For example, is there any performance difference between a

How to get a file size of remote file from googlecode with cURL?

余生颓废 提交于 2019-12-25 16:48:30
问题 I am trying to get a file size of remote file "compiler-latest.zip" (googlecode.com) using cURL without actually downloading it, here is my PHP code: $url = 'http://closure-compiler.googlecode.com/files/compiler-latest.zip'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // optional curl_setopt($ch, CURLOPT_MAXREDIRS, 10);

How to get a file size of remote file from googlecode with cURL?

荒凉一梦 提交于 2019-12-25 16:48:18
问题 I am trying to get a file size of remote file "compiler-latest.zip" (googlecode.com) using cURL without actually downloading it, here is my PHP code: $url = 'http://closure-compiler.googlecode.com/files/compiler-latest.zip'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // optional curl_setopt($ch, CURLOPT_MAXREDIRS, 10);

Find input file size in Fortran 90

有些话、适合烂在心里 提交于 2019-12-25 02:24:35
问题 I'm trying to create a progress indicator based on the total file size vs. file size read so far. I am working with a binary file. open(unit=unitvector, file=vectorname, status='old',form='unformatted') do while (ios.eq.0) read(unitvector,end=888,err=888, iostat=ios) KX, KY, KZ, KNAME, NV, NE, WEIGHT nkcount=nkcount+1 call progress(FILE SIZE, PROGRESS SIZE) allocate( Vector(3,NV) ) read(unitvector) (Vector(1,I),Vector(2,I),Vector(3,I),I=1,NV) . . . end do To compile i use: ifort -warn all

Large File Uploads Fails in Chrome with Valums

你。 提交于 2019-12-24 10:36:34
问题 I am using the valums ajax upload component (http://valums.com/ajax-upload/). My site is going to have users uploading files that are greater than 500MB in size. I have a strict pure HTML requirement. I can successfully upload files of this size in Internet Explorer. However, when I attempt to use Chrome, the file is never written on the server, but only in the case of large files. For smaller files, the file is successfully written. But for larger files, I get an "Maximum request length

File size - actual number of bytes used on disk (not allocated) [duplicate]

和自甴很熟 提交于 2019-12-24 08:25:15
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Get Size of file on disk Is there a way to retrieve the actual number of bytes used for a particular file on disk, using C# / windows? My application implements "watch" folders, similar to FileSystemWatcher. Some watch folders exist on shared storage (both network and fibre channel SAN), others on locally attached storage. Files are copied into a watch folder by processes that are completely out of my control,

C# FTP Size command doesn't work on all FTP servers

亡梦爱人 提交于 2019-12-24 05:33:11
问题 I am having some trouble with a very simple snippet of code: private long getFTPLogLength() { long size; FtpWebRequest ftpRequest = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpURL)); ftpRequest.Credentials = new NetworkCredential(ftpUsername, ftpPassword); try { ftpRequest.ReadWriteTimeout = 6000; ftpRequest.Method = WebRequestMethods.Ftp.GetFileSize; FtpWebResponse respSize = (FtpWebResponse)ftpRequest.GetResponse(); size = respSize.ContentLength; respSize.Close(); } catch (Exception ex)

php loop folder get the file names and size

只愿长相守 提交于 2019-12-24 02:12:43
问题 I want make a loop of my fold, get all the files and make a judge, print all the files name witch size are less than 10kb. But I get nothing from this code (no php error hint, just 0 result, and I am sure there has 10 files at lest < 10kb), where is the problem? Thanks. $folder = dirname('__FILE__')."/../images/*"; foreach(glob($folder) as files){ $size = filesize(files); if($size<10240){ echo files.'<br />'; } } 回答1: I think there's a typo, because dirname('__FILE__') should be (without

PHP - filesize() returns an empty string

*爱你&永不变心* 提交于 2019-12-24 00:44:09
问题 I have a strange problem. I have an image which i need to upload to a file server. I 'm using php to do this. The image permissions are the following -rw-r--r--. 1 apache apache 148041 Dec 22 08:25 Not.jpg I checked that the file exists. I have downloaded the file and found it to be ok. it's original size is 60 KB. Permissions are also fine. When I do the following $filepath = "../uploads/".$file_name; $image = fopen($filepath, "rb"); echo file_exists($filepath).' '; echo filesize($filepath).