Sponsored Content
Top Forums UNIX for Advanced & Expert Users Conversion between different block size filesystems Post 39222 by Perderabo on Monday 11th of August 2003 10:18:02 AM
Old 08-11-2003
Every filesystem has a value the represents the smallest unit of storage that can be allocated. This might be 512 or 1024, but 512 does seem small. If you create a 1 byte file, the filesystem must actually give you its smallest unit.
 

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. UNIX for Advanced & Expert Users

Need to synchronize filesystems with huge size

Hello, I am using IXOS 3rd party utility to maintain invoices (images) in my client's SAP system. We have a DR (Disaster Recovery) setup & for that I need to synchronize my /ixos filesystem (with size more than 50 GB) between two servers say x182 & x050. Initially I thought to tar the... (4 Replies)
Discussion started by: vishal_ranjan
4 Replies

7. 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

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
Df(3pm) 						User Contributed Perl Documentation						   Df(3pm)

NAME
Filesys::Df - Perl extension for filesystem disk space information. SYNOPSIS
use Filesys::Df; #### Get information by passing a scalar directory/filename value my $ref = df("/tmp"); # Default output is 1K blocks if(defined($ref)) { print "Total 1k blocks: $ref->{blocks} "; print "Total 1k blocks free: $ref->{bfree} "; print "Total 1k blocks avail to me: $ref->{bavail} "; print "Total 1k blocks used: $ref->{used} "; print "Percent full: $ref->{per} "; if(exists($ref->{files})) { print "Total inodes: $ref->{files} "; print "Total inodes free: $ref->{ffree} "; print "Inode percent full: $ref->{fper} "; } } #### Get information by passing a filehandle open(FILE, "some_file"); # Get information for filesystem at "some_file" my $ref = df(*FILE); #### or my $ref = df(*FILE); #### or my $fhref = *FILE; my $ref = df($fhref); #### Get information in other than 1k blocks my $ref = df("/tmp", 8192); # output is 8K blocks my $ref = df("/tmp", 1); # output is bytes DESCRIPTION
This module provides a way to obtain filesystem disk space information. This is a Unix only distribution. If you want to gather this information for Unix and Windows, use "Filesys::DfPortable". The only major benefit of using "Filesys::Df" over "Filesys::DfPortable", is that "Filesys::Df" supports the use of open filehandles as arguments. The module should work with all flavors of Unix that implement the "statvfs()" and "fstatvfs()" calls, or the "statfs()" and "fstatfs()" calls. This would include Linux, *BSD, HP-UX, AIX, Solaris, Mac OS X, Irix, Cygwin, etc ... "df()" requires a argument that represents the filesystem you want to query. The argument can be either a scalar directory/file name or a open filehandle. There is also an optional block size argument so you can tailor the size of the values returned. The default block size is 1024. This will cause the function to return the values in 1k blocks. If you want bytes, set the block size to 1. "df()" returns a reference to a hash. The keys available in the hash are as follows: "{blocks}" = Total blocks on the filesystem. "{bfree}" = Total blocks free on the filesystem. "{bavail}" = Total blocks available to the user executing the Perl application. This can be different than "{bfree}" if you have per-user quotas on the filesystem, or if the super user has a reserved amount. "{bavail}" can also be a negative value because of this. For instance if there is more space being used then you have available to you. "{used}" = Total blocks used on the filesystem. "{per}" = Percent of disk space used. This is based on the disk space available to the user executing the application. In other words, if the filesystem has 10% of its space reserved for the superuser, then the percent used can go up to 110%. You can obtain inode information through the module as well, but you must call "exists()" on the "{files}" key first, to make sure the information is available. Some filesystems may not return inode information, for example some NFS filesystems. Here are the available inode keys: "{files}" = Total inodes on the filesystem. "{ffree}" = Total inodes free on the filesystem. "{favail}" = Total inodes available to the user executing the application. See the rules for the "{bavail}" key. "{fused}" = Total inodes used on the filesystem. "{fper}" = Percent of inodes used on the filesystem. See rules for the "{per}" key. There are some undocumented keys that are defined to maintain backwards compatibilty: "{su_blocks}", "{user_blocks}", etc ... If the "df()" call fails for any reason, it will return undef. This will probably happen if you do anything crazy like try to get information for /proc, or if you pass an invalid filesystem name, or if there is an internal error. "df()" will "croak()" if you pass it a undefined value. Requirements: Your system must contain "statvfs()" and "fstatvfs()", or "statfs()" and "fstatfs()" You must be running Perl 5.6 or higher. AUTHOR
Ian Guthrie IGuthrie@aol.com Copyright (c) 2006 Ian Guthrie. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
statvfs(2), fstatvfs(2), statfs(2), fstatfs(2), df(1), Filesys::DfPortable perl(1). perl v5.14.2 2006-06-25 Df(3pm)
All times are GMT -4. The time now is 02:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy