08-04-2006
sparse files
what are sparse files?
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I am going to migrate our datawarehouse system from HP Tru 64 Unix to the Red Hat Linux.
Inside the box, it is running around 40 cron jobs; inside each cron job, it is calling other shell script files, and the shell script files may again call other shell script files or ctl files(for... (1 Reply)
Discussion started by: franksubramania
1 Replies
2. Programming
Lets say my program reads one block (4096 bytes) at a time from a file. It needs to report whether that block is a hole.
The program currently uses read() to read 1 block into a 4KB buffer.
Now I know that even if that block is a hole, it will be replaced by a sequence of NULL bytes '\0'... (15 Replies)
Discussion started by: tantric
15 Replies
3. Shell Programming and Scripting
Hi All,
I have a matrix stored in a file matrix.mtx and looks like this:
1 0.5 0.33 0.25
0 0.33 0.25 0.2
0 0 0 0.16
0 0 0 0.14
I want to convert this matrix to its sparse representation like the one give below (sparse_matrix.mtx). This means that above matrix has been converted to its... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
4. Shell Programming and Scripting
I am no Unix administrator...I live in windows land.
I wrote a script to find files of certain names and process them but was later advised to avoid checking sparse files since it would use up a lot of resources and the files I was looking for were not there.
How do I avoid doing the find on... (3 Replies)
Discussion started by: shellFun
3 Replies
5. Shell Programming and Scripting
Hi,
I am new to shell scripting.Please help me on this.I am using solaris 10 OS and shell i am using is
# echo $0
-sh
My requirement is i have source file say makefile.I need to extract files with extensions (.c |.cxx |.h |.hxx |.sc) from the makefile.after doing so i need to check whether... (13 Replies)
Discussion started by: muraliinfy04
13 Replies
6. Programming
Which data structure will be most appropriate to represent a sparse array? (1 Reply)
Discussion started by: rupeshkp728
1 Replies
7. Shell Programming and Scripting
I need a script file for backup (zip or tar or gz) of old log files in our unix server (causing the space problem). Could you please help me to create the zip or gz files for each log files in current directory and sub-directories also?
I found one command which is to create gz file for the... (4 Replies)
Discussion started by: Mallikgm
4 Replies
8. UNIX for Beginners Questions & Answers
i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies
LEARN ABOUT REDHAT
e2image
E2IMAGE(8) System Manager's Manual E2IMAGE(8)
NAME
e2image - Save critical ext2 filesystem data to a file
SYNOPSIS
e2image [ -r ] device image-file
DESCRIPTION
The e2image program will save critical filesystem data on the ext2 filesystem located on device to a file specified by image-file. The
image file may be examined by dumpe2fs and debugfs, by using the -i option to those programs. This can be used by an expert in assisting
the recovery of catastrophically corrupted filesystems. In the future, e2fsck will be enhanced to be able to use the image file to help
recover a badly damaged filesystem.
If image-file is -, then the output of e2image will be sent to standard output.
The -r option will create a raw image file instead of a normal image file. A raw image file differs from a normal image file in two ways.
First, the filesystem metadata is placed in the proper position so that e2fsck, dumpe2fs, debugfs, etc. can be run directly on the raw
image file. In order to minimize the amount of disk space consumed by a raw image file, the file is created as a sparse file. (Beware of
copying or compressing/decompressing this file with utilities that don't understand how to create sparse files; the file will become as
large as the filesystem itself!) Secondly, the raw image file also includes indirect blocks and data blocks, which the current image file
does not have, although this may change in the future.
It is a very good idea to periodically (at boot time and every week or so) to create image files for all of filesystems on a system, as
well as saving the partition layout (which can be generated using the using fdisk -l command). Ideally the image file should be stored on
some filesystem other that the filesystem whose data it contains, to ensure that its data is accessible in the case where the filesystem
has been badly damaged.
To save disk space, e2image creates the image file as a sparse file. Hence, if the image file needs to be copied to another location, it
should either be compressed first or copied using the --sparse=always option to GNU version of cp.
The size of an ext2 image file depends primarily on the size of the filesystems and how many inodes are in use. For a typical 10 gigabyte
filesystem, with 200,000 inodes in use out of 1.2 million inodes, the image file be approximately 35 megabytes; a 4 gigabyte filesystem
with 15,000 inodes in use out of 550,000 inodes will result in a 3 megabyte image file. Image files tend to be quite compressible; an
image file taking up 32 megabytes of space on disk will generally compress down to 3 or 4 megabytes.
AUTHOR
e2image was written by Theodore Ts'o (tytso@mit.edu).
AVAILABILITY
e2image is part of the e2fsprogs package and is available from anonymous http://e2fsprogs.sourceforge.net.
SEE ALSO
dumpe2fs(8), debugfs(8)
E2fsprogs version 1.32 November 2002 E2IMAGE(8)