Skip to content

antoniosk10/node_file-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Node.js File Manager

The program is started by npm-script start in following way:

npm run start -- --username=your_username

List of operations and their syntax:

  • Navigation & working directory (nwd)

    • Go upper from current directory (when you are in the root folder this operation shouldn't change working directory)
    up
    • Go to dedicated folder from current directory (path_to_directory can be relative or absolute)
    cd path_to_directory
    • List all files and folder in current directory and print it to console
    ls
  • Basic operations with files

    • Read file and print it's content in console:
    cat path_to_file
    • Create empty file in current working directory:
    add new_file_name
    • Rename file:
    rn path_to_file new_filename
    Example: rn user/file.txt newFile.txt
    
    • Copy file:
    cp path_to_file path_to_new_directory
    Example: cp user/file.txt documents/
    
    • Move file (same as copy but initial file is deleted):
    mv path_to_file path_to_new_directory
    Example: mv user/file.txt documents/
    
    • Delete file:
    rm path_to_file
  • Operating system info (prints following information in console)

    • Get EOL (default system End-Of-Line)
    os --EOL
    • Get host machine CPUs info (overall amount of CPUS plus model and clock rate (in GHz) for each of them)
    os --cpus
    • Get home directory:
    os --homedir
    • Get current system user name (Do not confuse with the username that is set when the application starts)
    os --username
    • Get CPU architecture for which Node.js binary has compiled
    os --architecture
  • Hash calculation

    • Calculate hash for file and print it into console
    hash path_to_file
  • Compress and decompress operations

    • Compress file (using Brotli algorytm)
    compress path_to_file path_to_destination

    Examples:

    compress file.txt /
    result: created file.txt.br in the same directory as source
    
    compress file.txt newFile.br
    result: created newFile.br in the same directory as source
    
    • Decompress file (using Brotli algorytm)
    decompress path_to_file path_to_destination

    Examples:

    decompress file.txt.br /
    result: created file.txt in the same directory as source
    
    decompress file.txt.br newFile.txt
    result: created newFile.txt in the same directory as source
    
    decompress file.txt documents/
    result: created documents/file.txt
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors