GithubHelp home page GithubHelp logo

node-file-manager's Introduction

CLI FILE MANAGER

The simple CLI application for working with file system and some special commands.

How to start

npm run start - run app with anonymous user

npm run start -- --username=Siarhei - run app with specified user

Commands

If you use spaces in the paths, don't wrap it in quotes. Example: cd D:\Dir with space\File with space.txt

1. Navigation & working directory

up - go upper from current directory

cd path_to_directory - go to dedicated folder from current directory (path_to_directory can be relative or absolute)

Examples:

cd ../Dir
cd D:\Dir
cd ../Dir with space

ls - print in console list of all files and folders in current directory

2. Basic operations with files

cat path_to_file - read file and print it's content in console

Examples:

cat ../file.txt
cat D:\Dir\file.txt
cat ../Dir with space/File with space.txt

add new_file_name - create empty file in current working directory

Examples:

add file.txt
add File with space.txt
add .config

rn path_to_file new_filename - rename file

Examples:

rn ../file.txt newFile.txt
rn D:\Dir\file.txt newFile.txt
rn ../Dir with space/File with space.txt newFile.txt

cp path_to_file path_to_new_directory - copy file

Examples:

cp ../file.txt ../Dir/
cp D:\Dir\file.txt C:\Dir\
cp ../Dir with space/File with space.txt C:\Dir with space\

mv path_to_file path_to_new_directory - move file (same as copy but initial file is deleted)

Examples:

mv ../file.txt ../Dir/
mv D:\Dir\file.txt C:\Dir\
mv ../Dir with space/File with space.txt C:\Dir with space\

rm path_to_file - delete file

Examples:

rm ../file.txt
rm D:\Dir\file.txt
rm ../Dir with space/File with space.txt

3. Operating system info

os --EOL - print EOL (default system End-Of-Line) to console

os --cpus - print host machine CPUs (overall amount of CPUS plus model and clock rate (in GHz) for each of them) info to console

os --homedir - print home directory to console

os --username - print current system user name to console

os --architecture - print CPU architecture for which Node.js binary has compiled to console

  • ###Hash calculation hash path_to_file - calculate hash for file and print it into console

Examples:

hash ./file.txt
hash D:\Dir\file.txt
hash ../Dir with space/File with space.txt

4. Compress and decompress operations

compress path_to_file path_to_destination - compress file with same name

- path_to_destination = directory

Examples:

compress ../file.txt ../Dir/
compress D:\Dir\file.txt C:\Dir\
compress ../Dir with space/File with space.txt C:\Dir with space\

decompress path_to_file path_to_destination - decompress file with same name

- path_to_destination = directory

- you can specify or not the extension .br

Examples:

decompress ../file.txt ../Dir/
decompress D:\Dir\file.txt.br C:\Dir\
decompress ../Dir with space/File with space.txt C:\Dir with space\

If you find a bug please let me know Linkedin. Thank you!

node-file-manager's People

Contributors

segegha 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.