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.
To install the package, run the following command:
pip install linux-commandOnce installed, you can access all commands using cmd followed by the specific command name. You can use cmd -h or cmd --help to see the supported commands. Below is a list of supported commands along with examples for each.
cmd ls2. ls-all - List all files, including hidden ones
cmd ls-allcmd ls-longcmd ls-humancmd ls-sizecmd ls-recursivecmd ls-dircmd ls-filecmd ls-reversecmd ls-timecmd ls-recursive-sizecmd ls-block-size Mcmd pscmd ps-allcmd ps-user usernamecmd ps-auxcmd ps-sort-memorycmd ps-sort-cpucmd ps-grep pythoncmd kill process_namecmd dfcmd du /path/to/directorycmd rm /path/to/file_or_directorycmd rm /path/to/directory *.txt *.logcmd grep "search_term" /path/to/file26. tar-compress [source directory] [output file] [--exclude file_or_directory ...] - Compress directories into .tar or .tar.gz while excluding specific files or folders
cmd tar-compress /path/to/source /path/to/output.tar.gz --exclude node_modules --exclude .gitThis command will compress /path/to/source into /path/to/output.tar.gz and exclude the node_modules and .git directories.
27. tar-extract [source] [destination directory] - Extract a single file or all .tar/.tar.gz files from a specified directory
- To extract a single
.taror.tar.gzfile:
cmd tar-extract /path/to/archive.tar.gz /path/to/destination- To extract all
.tarand.tar.gzfiles within a directory (default: all):
cmd tar-extract /path/to/directory /path/to/destination all- To extract all
.tarfiles within a directory:
cmd tar-extract /path/to/directory /destination/path tar- To extract all
.tar.gzfiles within a directory:
cmd tar-extract /path/to/directory /destination/path gzcmd tar-list archive.tar.gzcmd tar-add newfile.txt archive.tar30. unzip-all [source directory] [target directory] - Extract all .zip files found in a specified directory into a target directory
cmd unzip-all /path/to/zips /path/to/extractThis command will find all .zip files in /path/to/zips and extract each into /path/to/extract.
31. zip-compress [output file.zip] [directory or file ...] - Create a .zip file that includes multiple specified directories or files
cmd zip-compress /path/to/output.zip /path/to/dir1 /path/to/dir2This command will create a .zip file at /path/to/output.zip that contains everything in /path/to/dir1 and /path/to/dir2.
We welcome contributions from the community! If you'd like to help improve linux-command, feel free to report issues or submit pull requests.
- 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 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.
This project is licensed under the MIT License.