Skip to main content

A command line tool to perform custom tasks.

Project description

linux-command

linux-command is a versatile package that provides a collection of frequently used Linux commands in a convenient wrapper. It can be installed via pip and accessed using the cmd command in the terminal.

Installation

To install the package, run the following command:

pip install linux-command

Usage

Once installed, you can access all commands using cmd followed by the specific command name. Below is a list of supported commands along with examples for each.


1. ls - List files in the current directory

cmd ls

2. ls-all - List all files, including hidden ones

cmd ls-all

3. ls-long - Long format listing

cmd ls-long

4. ls-human - List in human-readable format (file sizes)

cmd ls-human

5. ls-size - Sort files by size

cmd ls-size

6. ls-recursive - Recursively list files in directories and subdirectories

cmd ls-recursive

7. ls-dir - Count the number of directories

cmd ls-dir

8. ls-file - Count the number of files

cmd ls-file

9. ls-reverse - List files and directories in reverse order

cmd ls-reverse

10. ls-time - Sort by modification time (newest first)

cmd ls-time

11. ls-recursive-size - List files and directories recursively with human-readable sizes

cmd ls-recursive-size

12. ls-block-size - Display the size of each file in a specified block size (e.g., K, M, G)

cmd ls-block-size M

13. ps - Show running processes

cmd ps

14. ps-all - Show all processes

cmd ps-all

15. ps-user [username] - Show processes for a specific user

cmd ps-user username

16. ps-aux - Show detailed information about all processes

cmd ps-aux

17. ps-sort-memory - Sort processes by memory usage

cmd ps-sort-memory

18. ps-sort-cpu - Sort processes by CPU usage

cmd ps-sort-cpu

19. ps-grep [keyword] - Search for a specific process by name or keyword

cmd ps-grep python

20. kill [process_name_or_PID] - Kill a process by name or PID

cmd kill process_name

21. df - Show disk usage in human-readable format

cmd df

22. du [path] - Show disk usage for a specific file or directory

cmd du /path/to/directory

23. rm [file_or_directory] - Remove a file or directory with confirmation

cmd rm /path/to/file_or_directory

24. rm [directory] [file_patterns...] - Remove multiple files by pattern (e.g., *.txt)

cmd rm /path/to/directory *.txt *.log

25. grep [pattern] [file] - Search for a pattern in a file

cmd grep "search_term" /path/to/file

26. tar-compress [source] [output] - Compress files into a .tar or .tar.gz archive

  • For .tar.gz:
cmd tar-compress /path/to/source archive.tar.gz
  • For .tar:
cmd tar-compress /path/to/source archive.tar

27. tar-extract [archive] [destination] - Extract a .tar or .tar.gz archive

  • For .tar.gz:
cmd tar-extract archive.tar.gz /path/to/destination
  • For .tar:
cmd tar-extract archive.tar /path/to/destination

28. tar-list [archive] - List contents of a .tar or .tar.gz archive

cmd tar-list archive.tar.gz

29. tar-add [file] [archive] - Add a file to an existing .tar archive

cmd tar-add newfile.txt archive.tar

Contributing

We welcome contributions from the community! If you'd like to help improve linux-command, including reporting issues and submitting pull requests.

Guidelines for Contributors

  • Follow the existing coding style where possible.
  • Make sure your changes do not break existing functionality.
  • Before submitting a major feature, it’s often a good idea to first discuss it by opening an issue.

Thank you!

Thank you for your interest in contributing to linux-command! Your contributions are greatly appreciated and help make this tool better for everyone. For any questions or to get started, feel free to reach out or open an issue.


License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linux-command-0.1.0.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

linux_command-0.1.0-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page