Giter Club home page Giter Club logo

bmfs's Introduction

BMFS

Build Status

Utility for accessing a disk or disk image formatted with BareMetal File System (BMFS).

Prerequisites

GCC (C compiler) is required for building the BMFS disk utility.

In Ubuntu this can be completed with the following command:

sudo apt-get install gcc

Optionally, you can also install the Filesystem in Userspace (FUSE) headers.

sudo apt-get install libfuse-dev

Building BMFS

make

You can copy the bmfs binary to a location in the system path for ease of use

Formatting a New Disk

bmfs --disk disk.image format 128M

You can also just use the default disk name, bmfs.img, and make the command simpler.

bmfs format 128M

In Linux/Unix/Mac OS X you can also format a physical drive by passing the correct path.

sudo bmfs /dev/sdc format

Display BMFS Disk Contents

To list dist contents, use the ls command.

bmfs ls -l

Or specify a path.

bmfs ls /home -l

Sample output:

bmfs ls -l
       0 Mar 24 23:08:13 usr
       0 Mar 24 23:08:14 home
       0 Mar 24 23:08:16 lib
       0 Mar 24 23:08:24 boot

If the command is being run by a script, you can omit the color by using the --color option, like this:

bmfs ls --color never

Aliases for the ls command are dir and list.

Create a New File

To create a new file without any content on it, you can just use the touch command.

bmfs touch /etc/bashrc

You can also create a new file by copying one from the host file system.

bmfs cp ./some-script.sh /bin/some-script.sh

An alias for the cp command is copy.

Reading File Contents from BMFS

To read a file from BMFS, you can use the cat command.

bmfs cat /home/john/.bashrc

Redirect the output to save it to a file.

bmfs cat /home/john/.bashrc >.bashrc

Delete a file on BMFS

To delete a file, use the rm command.

bmfs rm /var/log/unused-file.txt

An alias for the rm command is delete.

bmfs's People

Contributors

ianseyler avatar ker2x avatar munkhoff avatar tay10r avatar vilhelmgray avatar

Watchers

 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.