Skip to content

A CLI APP to demonstrate creation of custom linux command with dedicated MAN page

Notifications You must be signed in to change notification settings

AmanKumar2626/internCTL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

internCTL

internctl is a command-line tool designed to perform various system operations. It provides functionalities related to CPU information, memory information, user management, and file information retrieval.

Table of Contents

Installation

To use internctl, follow these steps:

  1. Clone the repository:

    git clone https://github.com/your-username/internctl.git
    
cd internctl
chmod +x internctl
sudo mv internctl /usr/local/bin/
internctl [options] subcommand [arguments]

Options:

  • --help: Display help information.
  • --version: Display the version of internctl.

Subcommands

  • cpu getinfo: Get CPU information (similar to lscpu).
  • memory getinfo: Get memory information (similar to free).
  • user create : Create a new user with the given username.
  • user list: List all regular users.
  • user list --sudo-only: List users with sudo permissions.
  • file getinfo [options] : Get information about a file. Options: --size, -s: Print file size. --permissions, -p: Print file permissions. --owner, -o: Print file owner. --last-modified, -m: Print last modified time of the file.

Examples

# Get CPU information
internctl cpu getinfo

# Get memory information
internctl memory getinfo

# Create a new user
internctl user create newuser

# List all regular users
internctl user list

# List users with sudo permissions
internctl user list --sudo-only

# Get file size
internctl file getinfo --size sample.txt

# Get file permissions
internctl file getinfo --permissions sample.txt

# Get file owner
internctl file getinfo --owner sample.txt

# Get last modified time of the file
internctl file getinfo --last-modified sample.txt

About

A CLI APP to demonstrate creation of custom linux command with dedicated MAN page

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published