Sponsored Content
Top Forums UNIX for Dummies Questions & Answers determine the size of a file??? Post 45742 by Kelam_Magnus on Tuesday 30th of December 2003 01:03:03 PM
Old 12-30-2003
alan,

Your file is listed in bytes. the smallest measurement of data commonly used.

If you remember or know anything of metric system:

Kilo ...=1000 bytes
mega =1000 kilo
giga ..=1000 mega
tera ..=1000 giga

If you want to experiment use the "prealloc" command. This will allow you to create files of any size allowed by your filesystem or OS.

prealloc <filename> <size>
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to determine the max file size

Does anyone know a way to determine the maximum filesize on a file system on Solaris, HP-UX, AIX, Linux, and OSF1 using the command line? TIA (2 Replies)
Discussion started by: dknight
2 Replies

2. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

3. HP-UX

determine the physical size of the hard disk

Hi is there a cmd in hpux 11 to determine the physical size of the hard disk. not bdf command. i have searched the other threads here but cant find an answer. thank you guys (4 Replies)
Discussion started by: hoffies
4 Replies

4. Shell Programming and Scripting

The scripts not able to make the file to size 0, every times it go back to its original size

#!/bin/sh ########################################################################################################## #This script is being used for AOK application for cleaning up the .out files and zip it under logs directory. # IBM # Created #For pdocap201/pdoca202 .out files for AOK #1.... (0 Replies)
Discussion started by: mridul10_crj
0 Replies

5. UNIX for Dummies Questions & Answers

Determine switch buffer size

Hi everybody, I need to calculate the tcp buffer size of a network switch, since it's not specified in the manual; how do I do this? I have some machines connected to the switch and I can run some socket tests written in C between these machines (I can choose how many bytes to send and... (0 Replies)
Discussion started by: dimpim
0 Replies

6. Shell Programming and Scripting

Script to read file size and send email only if size > 0.

Hi Experts, I have a script like $ORACLE_HOME/bin/sqlplus username/password # << ENDSQL set pagesize 0 trim on feedback off verify off echo off newp none timing off set serveroutput on set heading off spool Schemaerrtmp.txt select ' TIMESTAMP COMPUTER NAME ... (5 Replies)
Discussion started by: welldone
5 Replies

7. Programming

Perl : Inline program to determine file size

Hi, I have 5 files as below $ ll sam* -rw-rw-rw- 1 sam ugroup 0 Mar 21 06:06 sam3 -rw-rw-rw- 1 sam ugroup 0 Apr 3 22:41 sam2 -rw-rw-rw- 1 sam ugroup 17335 Apr 10 06:07 sam1 -rw-rw-rw- 1 sam ugroup 5 Apr 10 07:53 sam5 -rw-rw-rw- 1 sam ugroup 661 Apr 10 08:16 sam4 I want to list out... (4 Replies)
Discussion started by: sam05121988
4 Replies

8. UNIX for Dummies Questions & Answers

Ls directory size reporting byte size instead of file count

I have been searching both on Unix.com and Google and have not been able to find the answer to my question. I think it is partly because I can't come up with the right search terms. Recently, my virtual server switched storage devices and I think the problem may be related to that change.... (2 Replies)
Discussion started by: jmgibby
2 Replies

9. Shell Programming and Scripting

Script to determine Date,TotalFile,total size of file based on date

I have file listed like below -rw-r--r--+ 1 test test 17M Nov 26 14:43 test1.gz -rw-r--r--+ 1 test test 0 Nov 26 14:44 test2.gz -rw-r--r--+ 1 test test 0 Nov 27 10:41 test3.gz -rw-r--r--+ 1 test test 244K Nov 27 10:41 test4.gz -rw-r--r--+ 1 test test 17M Nov 27 10:41 test5.gz I... (5 Replies)
Discussion started by: krish2014
5 Replies

10. UNIX for Beginners Questions & Answers

How do I determine the best number to use for the bs (block size) operand of the dd command?

When I create a bootable Linux distro installation USB drive, I use this command: sudo dd if=/Path/to/linux_distro.iso of=/dev/rdisk<disk number> bs=<number of bytes> When I look it up, I've seen variations of people choosing 4M, and I think 8M, 2M, and maybe even 1M. If I leave the operand... (4 Replies)
Discussion started by: Quenz
4 Replies
UNITS(7)						     Linux Programmer's Manual							  UNITS(7)

NAME
units, kilo, kibi, mega, mebi, giga, gibi - decimal and binary prefixes DESCRIPTION
Decimal prefixes The SI system of units uses prefixes that indicate powers of ten. A kilometer is 1000 meter, and a megawatt is 1000000 watt. Below the standard prefixes. Prefix Name Value y yocto 10^-24 = 0.000000000000000000000001 z zepto 10^-21 = 0.000000000000000000001 a atto 10^-18 = 0.000000000000000001 f femto 10^-15 = 0.000000000000001 p pico 10^-12 = 0.000000000001 n nano 10^-9 = 0.000000001 u micro 10^-6 = 0.000001 m milli 10^-3 = 0.001 c centi 10^-2 = 0.01 d deci 10^-1 = 0.1 da deka 10^ 1 = 10 h hecto 10^ 2 = 100 k kilo 10^ 3 = 1000 M mega 10^ 6 = 1000000 G giga 10^ 9 = 1000000000 T tera 10^12 = 1000000000000 P peta 10^15 = 1000000000000000 E exa 10^18 = 1000000000000000000 Z zetta 10^21 = 1000000000000000000000 Y yotta 10^24 = 1000000000000000000000000 The symbol for micro is the Greek letter mu, often written u in an ASCII context where this Greek letter is not available. See also <http://physics.nist.gov/cuu/Units/prefixes.html> Binary prefixes The binary prefixes resemble the decimal ones, but have an additional 'i' (and "Ki" starts with a capital 'K'). The names are formed by taking the first syllable of the names of the decimal prefix with roughly the same size, followed by "bi" for "binary". Prefix Name Value Ki kibi 2^10 = 1024 Mi mebi 2^20 = 1048576 Gi gibi 2^30 = 1073741824 Ti tebi 2^40 = 1099511627776 Pi pebi 2^50 = 1125899906842624 Ei exbi 2^60 = 1152921504606846976 See also <http://physics.nist.gov/cuu/Units/binary.html> Discussion Before these binary prefixes were introduced, it was fairly common to use k=1000 and K=1024, just like b=bit, B=byte. Unfortunately, the M is capital already, and cannot be capitalized to indicate binary-ness. At first that didn't matter too much, since memory modules and disks came in sizes that were powers of two, so everyone knew that in such contexts "kilobyte" and "megabyte" meant 1024 and 1048576 bytes, respectively. What originally was a sloppy use of the prefixes "kilo" and "mega" started to become regarded as the "real true meaning" when computers were involved. But then disk technology changed, and disk sizes became arbitrary numbers. After a period of uncertainty all disk manufacturers settled on the standard, namely k=1000, M=1000k, G=1000M. The situation was messy: in the 14k4 modems, k=1000; in the 1.44MB diskettes, M=1024000; etc. In 1998 the IEC approved the standard that defines the binary prefixes given above, enabling people to be precise and unambiguous. Thus, today, MB = 1000000B and MiB = 1048576B. In the free software world programs are slowly being changed to conform. When the Linux kernel boots and says hda: 120064896 sectors (61473 MB) w/2048KiB Cache the MB are megabytes and the KiB are kibibytes. COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2012-08-05 UNITS(7)
All times are GMT -4. The time now is 10:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy