Skip to content

vandi37/vanfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vanfs

What is vanfs?

Vanfs (vandi's virtual file system) is a virtual file system.

Caution

IT ISN'T A VIRTUAL OS!!!

Vanfs isn't supposed to be a real file system, it only looks like a file system.

How to install it?

Windows

To install vanfs on windows you need to follow this steps

  1. Prepare

    install go if you don't have it.

  2. Install

    go install github.com/vandi37/vanfs@latest
  3. Enjoy your vanfs

    vanfs

Linux and MacOS

To install vanfs on linux or macos you need to follow this steps

  1. Prepare

    install go if you don't have it.

    install git if you don't have it.

    optional: you can install Make if you want to use Makefile

  2. Clone the repository.

    git clone https://github.com/vandi37/vanfs.git
    cd vanfs
  3. Install.

    You have two variants

    1. Use Makefile

      make install # you can edit the bin path in the Makefile

Warning

Be sure that you are at the root of the project.

2. Install by yourself

    ```bash
    sudo rm -rf /usr/bin/vanfs # or your bin path
    go build 
    sudo mv vanfs /usr/bin  # or your bin path
    ```

Warning

Be sure that you are at the root of the project.

  1. Enjoy your vanfs

    vanfs

How to create a new vfs?

If you run the program you will see the start menu

  • to choose a variant use arrows up and down

  • to exit use ctrl+c

What means "Load from path"?

To storage the directory tree and all file data should be a directory (in the real filesystem) with all files and the file with tree

Creating new file system

You can enter any name.

Default name will be vfs

After you need to enter path to backup directory

The directory should exist, or the program will trow an error

Default will be current path/vfs_backup/

Congratulations! You have created your vanfs

Loading from path

Enter path to backup directory

Congratulations! You have loaded your vanfs

Loading from default path

It loads from env.

to set path you need on linux you can do this

export VFS_PATH="/home/your_username/vfs_data"

The directory should exist, or the program will trow an error

After running vanfs and choosing "Load from default path" the vfs will load

How to use?

After creating and loading your vfs you can run this commands

Working with directories

  • cd {path}

    move your current directory to another directory

  • cd /

    moves you to the root

  • cd ..

    moves a directory higher in the directory tree

Tip

you can use

cd ../..

going two directories higher

cd ../../..

going three directories higher

cd /home

going to home directory

  • mkdir {name}

    creates a directory with name

Tip

ls shows the list of directories and files

  • mkdir {path for cd}/{name}

    creates a directory as the command was

    cd {path for cd}
    mkdir {name} 
    

    however cd can't move to not existing directory, and here it will create all directories that not exist.

  • rmdir {name}

    removes a directory with name

  • rmdir {path for cd}/{name}

    as

    rmdir {path for cd}/{name} 
    

    it is as

    cd {path for cd}
    rmdir {name} 
    

    and here if any directory in cd command or in rmdir does not exist it sends an error

Working with files

  • of {name}

    opens a file i text editor based on text area

    you can write any text

    to save ctrl+s

    to exit ctrl+c

Tip

for all {name} it is the same as with mkdir with entering any path.

  • cat {name}

    prints all file data

  • mkf {name}

    creates a new file

  • rm {name}

    removes the file

Lists

  • ls {path (could be empty)}

    shows list of all directories and files

  • tree {path (could be empty)}

    shows the tree

Other

  • clear

    clears console

  • exit

    exits from vfs

  • path

    shows path to backup file

Other

License

Attribution-NonCommercial-ShareAlike 4.0 International

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published