Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dir_ufs(4) [v7 man page]

dir_ufs(4)							   File Formats 							dir_ufs(4)

NAME
dir_ufs, dir - format of ufs directories SYNOPSIS
#include <sys/param.h> #include <sys/types.h> #include <sys/fs/ufs_fsdir.h> DESCRIPTION
A directory consists of some number of blocks of DIRBLKSIZ bytes, where DIRBLKSIZ is chosen such that it can be transferred to disk in a single atomic operation, for example, 512 bytes on most machines. Each DIRBLKSIZ-byte block contains some number of directory entry structures, which are of variable length. Each directory entry has a struct direct at the front of it, containing its inode number, the length of the entry, and the length of the name contained in the entry. These entries are followed by the name padded to a 4 byte boundary with null bytes. All names are guaranteed null-terminated. The maximum length of a name in a directory is MAXNAMLEN. #define DIRBLKSIZ DEV_BSIZE #define MAXNAMLEN 256 struct direct { ulong_t d_ino; /* inode number of entry */ ushort_t d_reclen; /* length of this record */ ushort_t d_namlen; /* length of string in d_name */ char d_name[MAXNAMLEN + 1]; /* maximum name length */ }; ATTRIBUTES
See attributes(5) for a description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Unstable | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5), ufs(7FS) SunOS 5.10 16 Apr 2003 dir_ufs(4)

Check Out this Related Man Page

dir_ufs(4)							   File Formats 							dir_ufs(4)

NAME
dir_ufs, dir - format of ufs directories SYNOPSIS
#include <sys/param.h> #include <sys/types.h> #include <sys/fs/ufs_fsdir.h> DESCRIPTION
A directory consists of some number of blocks of DIRBLKSIZ bytes, where DIRBLKSIZ is chosen such that it can be transferred to disk in a single atomic operation, for example, 512 bytes on most machines. Each DIRBLKSIZ-byte block contains some number of directory entry structures, which are of variable length. Each directory entry has a struct direct at the front of it, containing its inode number, the length of the entry, and the length of the name contained in the entry. These entries are followed by the name padded to a 4 byte boundary with null bytes. All names are guaranteed null-terminated. The maximum length of a name in a directory is MAXNAMLEN. #define DIRBLKSIZ DEV_BSIZE #define MAXNAMLEN 256 struct direct { ulong_t d_ino; /* inode number of entry */ ushort_t d_reclen; /* length of this record */ ushort_t d_namlen; /* length of string in d_name */ char d_name[MAXNAMLEN + 1]; /* maximum name length */ }; ATTRIBUTES
See attributes(5) for a description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Unstable | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5), ufs(7FS) SunOS 5.10 16 Apr 2003 dir_ufs(4)
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Maximum file name length

Hi folks, Can anybody tell me whether there is any limit on the file name length and directory name length in UNIX. (4 Replies)
Discussion started by: rkkiran
4 Replies

2. Shell Programming and Scripting

File length

I need to be able to get the length of a specific file. If the file length <> 0, then I need to email it to an address. I tried this: if then (cat $DSDIR/non_reporting_stores.txt) | mail -s "Daily Non Reporting Stores" xyz@xysz.com fi which gave me a syntax error that it could not... (1 Reply)
Discussion started by: poste_d_ordure
1 Replies

3. UNIX for Dummies Questions & Answers

Not quite related to Unix but CP/M file structure...

I'm not sure where to post this but I'm having some trouble with the directories in CP/M... I'm sorry about the length but I'm totally confused... I've seen that the directory entry in CP/M contains the following: 1 byte User Code 8 bytes Filename 3 bytes File extension 1 byte Extension 2... (3 Replies)
Discussion started by: Legend986
3 Replies

4. Solaris

Creating a hardlink to a file

I'm trying to relink a file someone tried to delete while a process (that we don't want to shutdown) also had a filehandle open to it. Consequently, we've got an inode entry but no directory entry (aka 'file') for it. I've tracked the inode number down via lsof, as well as the particular... (0 Replies)
Discussion started by: Smiling Dragon
0 Replies