GithubHelp home page GithubHelp logo

unix_v6_filesystem's Introduction

Unix V6 file-system implementation

Requirements:

Unix V6 file system has limitation of 16MB on file size. Use single unused bit of the flags field to increase file size support to 32MB. Develop command line interface that will allow Unix user access to the file system of foreign operating system, which is modified version of Unix Version 6. In other words, create and maintain content of file system up to the size of 32MB and provide user interface to manipulate and access the content.

Compilation instructions:

gcc fsaccess.c -ofs

Run time:

./fs file_system_name

User input/commands:

  • initfs 5000 400 - initialize file system with 5000 blocks and 400 i-nodes. 65535 is maximum number of blocks. See below for explanation
  • cpin external_file internal_file - copy content of external_file into internal_file. Internal file name size should be less than 14 chr
  • cpout internal_file external_file - copy content of internal_file into external_file
  • mkdir dir_name - create directory with dir_name. Directory name size should be less than 14 chr
  • Rm internal_file - remove file and mark its blocks as free
  • q - exit
  • exit - exit (same as "q")

Additional notes

  • File system size is limited to 65535 blocks of 512 Bytes each. This is due to maximum number that can be stored in unsigned short which is 2 bytes long
  • File name is limited to 14 characters

See docs/Example_commands_run.txt - for usage example

Usage Example:

$ ./fs file_for_submission

File system file_for_submission doesn't exists. You need to run initfs command MyFileSystem>>initfs 5000 32 Init file_system was requested: file_for_submission

Initialize file_system with 5000 number of blocks and 32 number of i-nodes,size of i-node 32 4 416

Bytes (2560000) written, block size 512, buffer: Directory in the block 4 File system successfully initialized MyFileSystem>>cpin copy_from_file.pdf pdf_file cpin was requested

Inside cpin, copy from copy_from_file.pdf to pdf_file

File pdf_file not found Copy From File copy_from_file.pdf exists. Trying to open...

Copy from File size is 120672

File successfully copied MyFileSystem>>mkdir Uri_dir mkdir was requested

File Uri_dir not found Directory node block number is 4 Directory Uri_dir successfully created MyFileSystem>>mkdir Uri_dir2 mkdir was requested

File Uri_dir2 not found Directory node block number is 4 Directory Uri_dir2 successfully created MyFileSystem>>cpin fsaccess_v8.c source_code cpin was requested

Inside cpin, copy from fsaccess_v8.c to source_code

File source_code not found Copy From File fsaccess_v8.c exists. Trying to open...

Copy from File size is 37529

File successfully copied MyFileSystem>>exit Number of executed commands is..6

unix_v6_filesystem's People

Contributors

us8945 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.