Sponsored Content
Full Discussion: Convert block size to mb
Top Forums UNIX for Dummies Questions & Answers Convert block size to mb Post 74042 by mh53j_fe on Tuesday 7th of June 2005 12:24:48 PM
Old 06-07-2005
Convert block size to mb

If I execute this command:
$ ls -lt | awk '{print $5}' | sort -nr |head -1

it returns the following value
57441881

If I execute this command:
$ ls -s | sort -nr | head -1 | cut -d" " -f1

it returns the same file but now in block size
112208

Is there a way I can calculate what the size in mb one block of data is? I want to create a shell script that has an "if block size > a hard-coded amount, do something. I want to translate block size into mb so that the rest of the team can understand what I am doing.

I tried 112208/57441881. This out put does not appear to be corrrect.

Your help will be highly appreciated.
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

block size

Hi, Somehow i have forgotten a comand that displays me the block size of the unix filesystem. Can someone letme know this command regards penguin (5 Replies)
Discussion started by: linuxpenguin
5 Replies

2. Filesystems, Disks and Memory

os block size

AIX 4.3.3 How can I find the os block size? How can I change the OS Block Size? When and where does the os block size get set? I am running oracle 8.1.7 and am under the impression I need to set my os block size = oracle block size which is 8k. Any insight on this would be... (1 Reply)
Discussion started by: kburrows
1 Replies

3. Solaris

block size

how do you determine block size for a file system? In solaris 5.8 (3 Replies)
Discussion started by: csaunders
3 Replies

4. UNIX for Dummies Questions & Answers

How to know the OS Block size

Hello Unix guru's I want to check my OS Block size for the Solaris 8 Following is one of the line from df -g command. Can anybody help to interpret the same. /u03 (/dev/vx/dsk/oradg/vol03): 8192 block size 8192 frag size 205463552 total blocks 50433792... (1 Reply)
Discussion started by: Dilippatel
1 Replies

5. UNIX for Dummies Questions & Answers

block size

Hi All, drwxr-xr-x 2 root root 4096 May 31 14:47 test Please let me know here 4096 indicating what? Thanks & Regards, Bache (1 Reply)
Discussion started by: bache_gowda
1 Replies

6. AIX

Block Size

Hi, I try to change the block size from 512 to 0, but it send this message: 0514-068 Cause not know Can someone help me whith this? (3 Replies)
Discussion started by: Ruben78
3 Replies

7. Shell Programming and Scripting

convert file storage size from one unit of measurement to another

The source number is always in megabytes and I need a script to covert into either MB,GB or TB displayed in a specific format. Source number examples: 5345376635 34255 5453645846353 The result has to be maximum 2 numbers after the comma 1.13 TB 134.17 TB 413.46 GB 678.45 MB I... (3 Replies)
Discussion started by: TehOne
3 Replies

8. UNIX for Advanced & Expert Users

Physical disk IO size smaller than fragment block filesystem size ?

Hello, in one default UFS filesystem we have 8K block size (bsize) and 1K fragmentsize (fsize). At this scenary I thought all "FileSytem IO" will be 8K (or greater) but never smaller than the fragment size (1K). If a UFS fragment/blocksize is allwasy several ADJACENTS sectors on disk (in a ... (4 Replies)
Discussion started by: rarino2
4 Replies

9. Red Hat

O/s block size

Hi Guys, I am running Linux 2.6.18-164.el x86_64 how do i check the block size? Thanks in advance... (1 Reply)
Discussion started by: Phuti
1 Replies

10. HP-UX

About Block Size and Fragment Size

Accordingly a lot of manuals - if you have block size 8KB and trying to write a 1KB file to the block, as result you waste 7KB of the block space. But recently I noticed about Fragments of File Block. In same case if you have File Block 8KB and Fragment size 1KB - you can save your block space,... (6 Replies)
Discussion started by: jess_t03
6 Replies
HASHER2(1)						    BSD General Commands Manual 						HASHER2(1)

NAME
hasher2 -- block based hashing utility SYNOPSIS
hasher2 [-hBrv] [-a algorithm] [-b size] [-s string] [-f from] [-t to] [[file] ...] DESCRIPTION
This program is part of the radare project. Hasher allows you to calculate, check and show the hash values of each block of a target file. The block size is 32768 bytes by default. It's allowed to hash from stdin using '-' as a target file. You can hash big files by hashing each block and later determine what part of it has been modified. Useful for filesystem analysis. This command can be used to calculate hashes of a certain part of a file or a command line passed string. This is the command used by the '#' command of radare. -a algo Select an algorithm for the hashing. Valid values are md5, crc32 and sha1 -b block size Define the block size -B Show per-block hash -s string Hash this string instead of using the 'source' and 'hash-file' arguments. -f from Start hashing at given address -t to Stop hashing at given address -r Show output in radare commands -v Show version information -h Show usage help message. SEE ALSO
radare2(1), rafind2(1), rahash2(1), rabin2(1), ranal2(1), radiff2(1), rasm2(1), ragg2(1), rarun2(1), rax2(1), AUTHORS
pancake <pancake@nopcode.org>, nibble <nibble@develsec.org> BSD
Mar 12, 2010 BSD
All times are GMT -4. The time now is 09:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy