09-29-2009
1 KB = 1 KiloByte = 2^10 (1024) Bytes
1 MB = 1 MegaByte = 2^10 (1024) KiloBytes = 2^20 (1048576) Bytes
1 GB = 1 GigaByte = 2^10 (1024) MegaBytes = 2^20 (1048576) KiloBytes = 2^30 (1073741824) Bytes
and so on to TB, PB, EB, ZB, ....
And there's no way to get to ~26 GB from 55207936, so I highly doubt that's given in Bytes, but rather stripes (or something similar).
10 More Discussions You Might Find Interesting
1. Solaris
I have a cron job set to run a script everyday. If I run the script out side of cron it runs correctly. If cron runs the script is produces a 0 byte file and it puts the output in the / directory. The script is set to put the output in a specific directory. Any help would be appreciated. (8 Replies)
Discussion started by: mbattreall
8 Replies
2. Shell Programming and Scripting
I was wondering can anyone give me a clue how to start script which would do the following:
I have 2 numbers as input for example: 100 and 1000 and I need to create file and in that file should be written
100 - 199
200 - 299
300 - 399
400 - 499
500 - 599
600 - 699
700 - 799... (3 Replies)
Discussion started by: amon
3 Replies
3. Shell Programming and Scripting
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)
Discussion started by: naveendronavall
1 Replies
4. Shell Programming and Scripting
OK, here is the output from a cron I have here:
FULL OUTPUT:
acoxxx Lastlogin= 2010/07/15 13:10
db2t Lastlogin= 2010/07/16 13:09
db2tadm Lastlogin= 2010/07/20 13:09
eisuser Lastlogin= 2010/07/20 11:53
israel Lastlogin= 2010/07/10 11:42
nmon Lastlogin= 2010/07/05 12:55
norbac Lastlogin=... (4 Replies)
Discussion started by: iga3725
4 Replies
5. Shell Programming and Scripting
While running script I am getting an error like
Few lines in data are not being processed.
After googling it I came to know that adding such line would give some memory to it
ini_set("memory_limit","64M");
my input file size is 1 GB.
Is that memory limit is based on RAM we have on... (1 Reply)
Discussion started by: elamurugu
1 Replies
6. Programming
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)
Discussion started by: royalibrahim
3 Replies
7. Shell Programming and Scripting
How do I output only the first 400 bytes of a huge text file to a new file.
It has to be unmodified so no added invisible characters.
Many thanks..... (3 Replies)
Discussion started by: garethsays
3 Replies
8. Shell Programming and Scripting
I have a timex 'dd' command that generates an output similar to this:
real 701.92
user 3.06
sys 469.10
for the moment, i m redirecting the output to a temp file to stage the calculation (using bc) for:
a) MB/s
b) cpu usage = 100*(user+sys)/real
I am looking around for an 1-liner... (3 Replies)
Discussion started by: ux4me
3 Replies
9. UNIX for Dummies Questions & Answers
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)
Discussion started by: razolo13
1 Replies
10. Shell Programming and Scripting
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 DEBIAN
format::human::bytes
Format::Human::Bytes(3pm) User Contributed Perl Documentation Format::Human::Bytes(3pm)
NAME
Format::Human::Bytes - Format a bytecount and make it human readable
VERSION
Version 0.05
SYNOPSIS
Ever showed 12345678 bytes to the user instead of just saying 11MB? This module returns you a printable string which is more readable by
humans than a simple bytecount.
use Format::Human::Bytes;
$readable = Format::Human::Bytes::base2($bytecount[,$decimals]);
$readable = Format::Human::Bytes::base10($bytecount[,$decimals]);
$readable = Format::Human::Bytes->base2($bytecount[,$decimals]);
$readable = Format::Human::Bytes->base10($bytecount[,$decimals]);
my $fhb = Format::Human::Bytes->new();
$readable = $fhb->base2($bytecount[,$decimals]);
$readable = $fhb->base10($bytecount[,$decimals]);
All functions do "intelligent" switching to the next unit, for example:
1000 => 1000B
[...]
8000 => 8000B
9000 => 9kB
The difference between 1000 bytes and 1500 bytes is usually bigger (for example because of a slow link) than between 95kB and 95,5kB. The
same applies to 8000kB vs. 9 MB and for the other units.
Depending on your usage, you may want to specify how many decimals should be shown (defaults to no decimals).
FUNCTIONS
/ METHODS
new
my $fhb = Format::Human::Bytes->new();
Creates and returns a Format::Human::Bytes - object.
base2
Callable as a function:
$readable = Format::Human::Bytes::base2($bytecount[,$decimals]);
Callable as a class method:
$readable = Format::Human::Bytes->base2($bytecount[,$decimals]);
Callable as a object method:
$readable = $fhb->base2($bytecount[,$decimals]);
Returns the correct readable form of the given bytecount.
Correct in this case means that 1kB are 1024 Bytes which is how computers see the world.
If you specify a decimal parameter, the result number will have the number of decimal numbers you specified.
base10
Callable as a function:
$readable = Format::Human::Bytes::base10($bytecount[,$decimals]);
Callable as a class method:
$readable = Format::Human::Bytes->base10($bytecount[,$decimals]);
Callable as a object method:
$readable = $fhb->base10($bytecount[,$decimals]);
Returns the incorrect readable form of the given bytecount.
Incorrect in this case means that 1kB is 1000 Bytes and 1 MB is 1000000 bytes which is how some (many) people see the world, but it's wrong
for computers.
If you specify a decimal parameter, the result number will have the number of decimal numbers you specified.
AUTHOR
Sebastian Willing, "<sewi at cpan.org>"
BUGS
Please report any bugs or feature requests to "bug-format-human-bytes at rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Format-Human-Bytes>. I will be notified, and then you'll automatically be notified of
progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Format::Human::Bytes
You can also look for information at:
o RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Format-Human-Bytes>
o AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/Format-Human-Bytes>
o CPAN Ratings
<http://cpanratings.perl.org/d/Format-Human-Bytes>
o Search CPAN
<http://search.cpan.org/dist/Format-Human-Bytes/>
HISTORY
The functions are in use since late 2003 or early 2004 but I didn't pack them for CPAN before 2009.
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.
perl v5.10.1 2010-04-08 Format::Human::Bytes(3pm)