Git Product home page Git Product logo

darshank15 / linux-terminal-based-file-explorer Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 1.15 MB

Designed Linux terminal based file explorer which operates on two mode command mode and GUI mode. Implemented all basic file operation such as create/delete/copy/move files or directory, search, rename, goto, back/forward and many more using system calls.

C++ 99.16% Makefile 0.84%
systemcall os fileoperations c cplusplus linux

linux-terminal-based-file-explorer's Introduction

Linux Terminal Based File Explorer

Prerequisites

  1. G++ compiler
    • sudo apt-get install g++

How to compile project

  1. go to project directory and run following command
    • make
  2. To clean solution
    • make clean

How to Run project

./main

Functionality Terminal File Explorer

File explorer is work in two modes. The application is start in normal mode, which is the default mode and used to explore the current directory and navigate around in the filesystem.
The root of the application is the directory where the application was started.
The last line of the display screen is to be used as status bar - to be used in normal and command-line modes.

1. Normal Mode:

1.1 Read and display list of files and directories in the current folder

  • File explorer show each file in the directory (one entry per line). The following attributes are visible for each file

    • File Name
    • File size (Human readable format similar to ls -lh)
    • Ownership (User & Group) & Permissions
    • Last modified
  • The File explorer also handle scrolling (vertical overflow) in case the directory has a lot of files.

  • The file explorer also show the entries “.” & “..” for current and parent directory respectively.

  • User is able to navigate up & down the file list using corresponding arrow keys.

1.2 Open files & directories

  • When enter is pressed
    • Directory​ - It will Clear the screen and Navigate into the directory and shows the files & directories inside it as specified in point 1
    • Files​ - It will open files using the corresponding default application.

2. Command Mode:

The application is enter the command mode whenever the : (colon) key is pressed.
Upon entering the command mode the user should be able to enter different commands. All commands should appear in a bottom status bar

2.1 copy, move and rename

copy <source_file(s)> <destination_directory>
move <source_file(s)> <destination_directory>
Eg:
copy foo.txt bar.txt baz.mp4 ~/foobar
move foo.txt bar.txt baz.mp4 ~/foobar
rename foo.txt bar.txt

Copying / Moving of directories is also be implemented

2.2 create files and directories

create_file <file_name> <destination_path>
create_dir <dir_name> <destination_path>
Eg:
create_file foo.txt ~/foobar
create_file foo.txt .
create_dir folder_name ~/foobar

2.3 delete files and directories

delete_file <file_path>
delete_dir <directory_path>
Eg:
delete_file ~/foobar/foo.txt.
delete_dir ~/foobar/folder_name

2.4 goto

goto <directory_path>
Eg:
goto /home/darshan/
goto ~

2.5 Search a file or folder given fullname.

search <filename>
Eg:
search foo.txt

Search for the given filename under the current directory recursively

2.6 Snapshotting the filesystem and dump into a file

snapshot <folder> <dumpfile>​
Eg:
snapshot ~/foobar/ dumpimg

Given a base directory this command recursively crawl the directory and store the output in dumpfile.

2.7 On pressing ‘ESC’ key the application should go to Normal Mode

linux-terminal-based-file-explorer's People

Contributors

darshank15 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

rushitjasani

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.