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-command
Once 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 ls
2. ls-all
- List all files, including hidden ones
cmd ls-all
cmd ls-long
cmd ls-human
cmd ls-size
cmd ls-recursive
cmd ls-dir
cmd ls-file
cmd ls-reverse
cmd ls-time
cmd ls-recursive-size
cmd ls-block-size M
cmd ps
cmd ps-all
cmd ps-user username
cmd ps-aux
cmd ps-sort-memory
cmd ps-sort-cpu
cmd ps-grep python
cmd kill process_name
cmd df
cmd du /path/to/directory
cmd rm /path/to/file_or_directory
cmd rm /path/to/directory *.txt *.log
cmd grep "search_term" /path/to/file
26. 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 .git
This 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
.tar
or.tar.gz
file:
cmd tar-extract /path/to/archive.tar.gz /path/to/destination
- To extract all
.tar
and.tar.gz
files within a directory (default: all):
cmd tar-extract /path/to/directory /path/to/destination all
- To extract all
.tar
files within a directory:
cmd tar-extract /path/to/directory /destination/path tar
- To extract all
.tar.gz
files within a directory:
cmd tar-extract /path/to/directory /destination/path gz
cmd tar-list archive.tar.gz
cmd tar-add newfile.txt archive.tar
30. 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/extract
This 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/dir2
This 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.