Hi All,
We have the commands top and ps through which we can find out the size of the running process.
These commnds are giving the size of my process in MB after rounding of the size.
Is there any way by which I can get the size of my process in Bytes or KBytes.
Any help would be greatly... (2 Replies)
Hi all,
Does anybody know or guide me on how to remove the first N bytes and the last N bytes from a binary file? Is there any AWK or SED or any command that I can use to achieve this?
Your help is greatly appreciated!!
Best Regards,
Naveen. (1 Reply)
The title is clear: why does ext3 allocate 8 blocks for files that are few bytes long?
If I create a file named "test", put a few chars in it, and then I run:
stat test
I get that "Blocks: 8"
I searched in the web and found that ext does that, it allocates 8 blocks even if It doesn't need... (4 Replies)
Any clues on how to get rid of this PHP error?
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes) in /website/www/includes/functions_manpages.php on line 58
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 71... (4 Replies)
Hi,
If I want to copy a 1024 byte data stream in to the target location in 3-bytes chunk, I guess I can use the following script.
dd bs=1024 count=3 if=/src of=/dest
But, I would like to know, how to do it via a C program. I have tried this with memcpy(), that did not help. (3 Replies)
Hello guys. I really hope someone will help me with this one..
So, I have to write this script who:
- creates a file home/student/vmdisk of 10 mb
- formats that file to ext3
- mounts that partition to /mnt/partition
- creates a file /mnt/partition/data. In this file, there will... (1 Reply)
Hi Friends,
Could you please tell me why i am getting the below eror while working with awk. I am confused :confused: what to do ?
awk: 0602-591 String 1,9,20,6,6 cannot be longer than 399 bytes. The source line is 1.
The error context is
>>> <<<
awk: 0602-591... (2 Replies)
hello,
suppose, entered input is of 1-40 bytes, i need it to be converted to 40 bytes exactly.
example: if i have entered my name anywhere between 1-40 i want it to be stored with 40 bytes exactly.
enter your name:
donald duck (this is of 11 bytes)
expected is as below - display 11... (3 Replies)
Discussion started by: shravan.300
3 Replies
LEARN ABOUT PHP
filesize
FILESIZE(3) 1 FILESIZE(3)filesize - Gets file sizeSYNOPSIS
int filesize (string $filename)
DESCRIPTION
Gets the size for the given file.
PARAMETERS
o $filename
- Path to the file.
RETURN VALUES
Returns the size of the file in bytes, or FALSE (and generates an error of level E_WARNING) in case of an error.
Note
Because PHP's integer type is signed and many platforms use 32bit integers, some filesystem functions may return unexpected results
for files which are larger than 2GB.
EXAMPLES
Example #1
filesize(3) example
<?php
// outputs e.g. somefile.txt: 1024 bytes
$filename = 'somefile.txt';
echo $filename . ': ' . filesize($filename) . ' bytes';
?>
ERRORS /EXCEPTIONS
Upon failure, an E_WARNING is emitted.
NOTES
Note
The results of this function are cached. See clearstatcache(3) for more details.
Tip
As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine
which wrappers support stat(3) family of functionality.
SEE ALSO file_exists(3).
PHP Documentation Group FILESIZE(3)