Sponsored Content
Top Forums UNIX for Advanced & Expert Users When a file is created where does unix store the info? Post 302105419 by sb008 on Thursday 1st of February 2007 02:52:49 PM
Old 02-01-2007
How would it help you to know where the information is stored?

You still would have to check there every 2 minutes to see if the information you expect is present.

Anyway information about files is stored in inodes. Inodes are stored in inode tables etc etc. You end up with the superblock
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX PATH info required PLEASE HELP (I'm new to unix)

I need to know how to enter a unix path in a cgi script for a guest book: example: My URL is http://www.kitachi.info I have an html file in the main folder on my site, the file is called : gbook.html what would the correct unix path for this file be ??? the part of the script... (1 Reply)
Discussion started by: akitachi
1 Replies

2. Shell Programming and Scripting

Need to find created date of file in UNIX

I need to write a script which has to list all the files which are created before six months from now. kindly help on this ... (7 Replies)
Discussion started by: amirthraj_12
7 Replies

3. UNIX for Dummies Questions & Answers

Open .zip file created in UNIX

Hi I am using the unix zip command to zip a file name to name .zip. I am then ftping the file to my windows Xp desktop and trying to open it using compressed(zipped) folders. Then iam getting an error like 'the compressed(zipped) folder is invalid or corrupted' Please advice. regards,... (5 Replies)
Discussion started by: sam99
5 Replies

4. UNIX for Dummies Questions & Answers

How to findout the files which are created after 12AM in unix server

Hi Friends, I want to get the list of the files which are created after 12AM in the server. Please help me on this to write a script. Thanks Sreenu. (1 Reply)
Discussion started by: sreenu80
1 Replies

5. Shell Programming and Scripting

Excel sheet to be created from unix.

Hi Guys, I like to create a excel sheet with four tabs. Is it possible to create it. Acutually i want to apply formulas in fourth tab which uses the three different tabs. Is it possible to create such a script? Thanks & regards, Magesh (3 Replies)
Discussion started by: mac4rfree
3 Replies

6. Shell Programming and Scripting

Find unix file created how many days ago?

i want to find unix file created how many days ago? (4 Replies)
Discussion started by: utoptas
4 Replies

7. Shell Programming and Scripting

Expand cells in .xls file created in unix

Hi Guys, I am creating a comma separated file by quering the table and routing it to a file with an extension .xls. I am using the mailx command to send the .xls file to windows mail box. The file is coming as a excel attachment, but the cells are not expanded. Is there a way by which... (4 Replies)
Discussion started by: mac4rfree
4 Replies

8. HP-UX

How to find a file created in UNIX every monday.???

Hi All Any one please suggest me... I have one directory every monday one file will be created in that directory. so if the file is created on monday or not i need check first. How can write a script??? if the file is not created i want to quit from script. Thanks K.Srinivas (5 Replies)
Discussion started by: k_s_rao7
5 Replies

9. Shell Programming and Scripting

How to send a file in UNIX through email which is created only 15 minutes before the current time?

I wanted to send an email to the client whenever there is failed record created in a /feed/HR-76/failed folder after processing of feed file. I can find out with the help of below script that what is the new file created but that file didn't make just 15 minutes before. ... (1 Reply)
Discussion started by: puneetkhullar
1 Replies

10. Shell Programming and Scripting

How to store info from a txt file into a hash?

I'm trying to make a perl script using the "open" command to open and read a file, storing the information in said file into a hash structure. This is what is inside my file- Celena Standard F 01/24/94 Cancer Jeniffer Orlowski F 06/24/86 None Brent Koehler M 12/05/97 HIV Mao Schleich... (4 Replies)
Discussion started by: Eric1
4 Replies
fs(4)							     Kernel Interfaces Manual							     fs(4)

NAME
fs, inode - Specifies the format of the file system volume SYNOPSIS
#include <sys/types.h> #include <sys/fs.h> #include <ufs/inode.h> DESCRIPTION
Every file system storage volume (disk, nine-track tape, for instance) has a common format for certain vital information. Each such volume is divided into a certain number of blocks. The block size is a parameter of the file system. Sectors beginning at BBLOCK and continuing for BBSIZE are used to contain a label and for some hardware primary and secondary bootstrapping programs. Each disk drive contains some number of file systems. A file system consists of a number of cylinder groups. Each cylinder group has inodes and data. A file system is described by its superblock, which in turn describes the cylinder groups. The superblock is critical data and is repli- cated in each cylinder group to protect against loss of data. This is done at file system creation time and the critical superblock data does not change, so the copies need not be referenced further until necessary. Addresses stored in inodes are capable of addressing fragments of blocks. File system blocks of at most MAXBSIZE size can be optionally broken into 2, 4, or 8 pieces, each of which is addressable; these pieces may be DEV_BSIZE, or some multiple of a DEV_BSIZE unit. Large files consist exclusively of large data blocks. To avoid wasted disk space, the last data block of a small file is allocated only as many fragments of a large block as are necessary. The file system format retains only a single pointer to such a fragment, which is a piece of a single large block that has been divided. The size of such a fragment is determined from information in the inode, using the blksize(fs, ip, lbn) macro. The file system records space availability at the fragment level; to determine block availability, aligned fragments are examined. The root inode is the root of the file system. Inode 0 (zero) can't be used for normal purposes and, historically, bad blocks were linked to inode 1. Thus, the root inode is 2 (inode 1 is no longer used for this purpose, but numerous dump tapes make this assumption). Some fields to the fs structure are as follows: Gives the minimum acceptable percentage of file system blocks that may be free. If the freelist drops below this level only the superuser may continue to allocate blocks. The fs_minfree field may be set to 0 (zero) if no reserve of free blocks is deemed necessary. However, severe performance degradations will be observed if the file system is run at greater than 90% full; thus the default value of the fs_minfree field is 10%. Empirically the best trade-off between block fragmentation and overall disk utilization at a loading of 90% comes with a fragmenta- tion of 8, thus the default fragment size is an eighth of the block size. Specifies whether the file system should try to minimize the time spent allocating blocks, or if it should attempt to minimize the space fragmentation on the disk. If the value of fs_min- free is less than 10%, then the file system defaults to optimizing for space to avoid running out of full sized blocks. If the value of fs_minfree is greater than or equal to 10%, fragmentation is unlikely to be problematical, and the file system defaults to optimizing for time. Cylinder group related limits: Each cylinder keeps track of the availability of blocks at different positions of rotation, so that sequential blocks can be laid out with minimum rotational latency. With the default of 8 distinguished rotational positions, the resolution of the summary information is 2 milliseconds for a typical 3600 rpm drive. Gives the minimum number of milliseconds to initiate another disk transfer on the same cylinder. The fs_rotdelay field is used in determining the rotationally optimal layout for disk blocks within a file; the default value for fs_rotdelay is 2 milliseconds. Each file system has a statically allocated number of inodes. An inode is allocated for each NBPI bytes of disk space. The inode alloca- tion strategy is extremely conservative. MINBSIZE is the smallest allowable block size. With a MINBSIZE of 4096 it is possible to create files of size 232 with only two levels of indirection. MINBSIZE must be big enough to hold a cylinder group block, thus changes to struct cg must keep its size within MINBSIZE. Note that superblocks are never more than size SBSIZE. The pathname on which the file system is mounted is maintained in fs_fsmnt. MAXMNTLEN defines the amount of space allocated in the superblock for this name. The limit on the amount of summary information per file system is defined by MAXCSBUFS. For a 4096 byte block size, it is currently parameterized for a maximum of two million cylinders. Per cylinder group information is summarized in blocks allocated from the first cylinder group's data blocks. These blocks are read in from fs_csaddr (size fs_cssize) in addition to the superblock. Superblock for a file system: The size of the rotational layout tables is limited by the fact that the superblock is of size SBSIZE. The size of these tables is inversely proportional to the block size of the file system. The size of the tables is increased when sector sizes are not powers of two, as this increases the number of cylinders included before the rotational pattern repeats (fs_cpc). The size of the rotational layout tables is derived from the number of bytes remaining in (struct fs). The number of blocks of data per cylinder group is limited because cylinder groups are at most one block. The inode and free block tables must fit into a single block after deducting space for the cylinder group structure struct cg. Inode: The inode is the focus of all file activity in the UNIX file system. There is a unique inode allocated for each active file, each current directory, each mounted-on file, text file, and the root. An inode is `named' by its device/i-number pair. NOTES
sizeof (struct csum) must be a power of two in order for the fs_cs macro to work. delim off fs(4)
All times are GMT -4. The time now is 02:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy