12-04-2007
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 bytes reserved
16 bytes Disk block numbers
First of all, what are those 2 bytes reserved for? Will that be used if the file occupies a large number of blocks thus supporting as an extension to that 1 byte "Extension field"? Secondly I don't understand how this works... Is it stored something like this?
1 | FileA | exe | 1 | --- | 1 2 3 4 5 6 7 8 9 ... 16 |
1 | FileA | exe | 2 | --- | 17 18 19 ...............33 |
...
...
I read that the Extension field is used to keep track of the order of the storage as to which blocks come first. The disk block numbers point to blocks of size 1 KB... So what is the largest disk that the CP/M could support anyways? Was it just a floppy disk or something? What happens if I choose a block size more than 1KB say 512 KB or something? I did a rough calculation messing with other parameters and got some 2048 GB which I think is just too huge to be true... I could've even made the block size as 1 MB but what is the limiting factor here?
Last edited by Legend986; 12-04-2007 at 08:42 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Does anyone know of a good Internet source that explains the directory structure of Unix/Linux??
Thanks
Gregg (2 Replies)
Discussion started by: gdboling
2 Replies
2. UNIX for Dummies Questions & Answers
well through my 6 months education i know some unix os but i can't find one for my p3 via board can any one tell me where to find such please replay as email or private msg and thanks (3 Replies)
Discussion started by: JaMaL
3 Replies
3. UNIX for Dummies Questions & Answers
What are some benefits of the UNIX hierarchical file structure?
I am new to UNIX and researching some information about it for a class so please help if you can.
Thanks. (1 Reply)
Discussion started by: 88923JJJSDK
1 Replies
4. Forum Support Area for Unregistered Users & Account Problems
How to post a new thread (Regarding Unix related doubts) in Unix Forums.
I registered my id but I am unable to post my Questions to Forum.
Thanks & Regards,
indusri (1 Reply)
Discussion started by: indusri
1 Replies
5. Programming
Before i start doing something, I wanted to know whether the approach to compare XML file with UNIX file system structure. I have a pre-configured file(contains a list of paths to executables) and i need to check against the UNIX directory structure. what are the various approches should i use ? I... (6 Replies)
Discussion started by: shafi2all
6 Replies
6. Fedora
Ok, I gotta ask this question, I have just begun fundamentals of UNIX in college and have learned or heard that Mac's OS-X is a linux based os! Does this mean that unix shell commands work in OS-X? I have no experience with os-x yet. I know it's a stupid question but I gotta know! (10 Replies)
Discussion started by: boarder428
10 Replies
7. UNIX for Advanced & Expert Users
Hi all,
Does unix has any commands for creating BLOB and CLOB objects.
Please forward me any sites or samples (2 Replies)
Discussion started by: rajeshorpu
2 Replies
8. Shell Programming and Scripting
Hi All,
I have a compute box and I want to tar directory structure under a directory and then Deploy/untar it in a new compute box so that the directory structure will be exactly the same.
I do not want any of the file to be extracted and deployed but instead only the directory structure.
... (2 Replies)
Discussion started by: filter
2 Replies
9. Shell Programming and Scripting
Hi All,
I am trying to dowmload the zip file "zkManageCustomers.zip " but i dont have access. Can anyone help me to download this file
See the below link-
http://www.ibm.com/developerworks/opensource/library/wa-aj-open/index.html?ca=drs-
Please help me as early as... (1 Reply)
Discussion started by: aish11
1 Replies
10. Ubuntu
hi
M using ubuntu 11.04....and has installed Seismic Unix on it....
I want to process some unprocessed segy data using Seismic Unix....
i have converted .segy file to .su using
segyread tape=file1.seg verbose=1 endian=0 | segyclean > smallfile.su
and got 3 files
-smallfile.su... (0 Replies)
Discussion started by: Ankita Singla
0 Replies
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)