https://github.com/socratescli/tagrun
Run a program with a modified process name.
https://github.com/socratescli/tagrun
Last synced: 4 days ago
JSON representation
Run a program with a modified process name.
- Host: GitHub
- URL: https://github.com/socratescli/tagrun
- Owner: socratescli
- License: mit
- Created: 2022-12-21T15:24:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-22T02:15:16.000Z (over 3 years ago)
- Last Synced: 2026-03-08T21:41:52.067Z (4 months ago)
- Language: Rust
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tagrun
Run a program with a modified process name. You can add a tag for a process with `tagrun`, and use the tag to locate the process with ps, pgrep or pkill.
## Usage
tagrun [--tag PROCESS_NAME_TAG] [--prefix PROCESS_NAME_PREFIX] COMMAND [ARG] ...
Run COMMAND, and rename the process(i.e., argv[0] of the command line).
--tag Rename the command with PROCESS_NAME_TAG.
--prefix Prepend the PROCESS_NAME_PREFIX to the command line.
## Example
tagrun --tag awake --prefix [test] sleep 1000
Above command will be displayed in the result of `ps aux` like
[test]awake 1000
And you can use `pgrep -f -x -a '\[test\]awake 1000'` to match the process.