linux-commands-guide 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. linux_commands_guide-2.0.0/PKG-INFO +147 -0
  2. linux_commands_guide-2.0.0/README.md +130 -0
  3. linux_commands_guide-2.0.0/guia_linux/__init__.py +4 -0
  4. linux_commands_guide-2.0.0/guia_linux/cli.py +89 -0
  5. linux_commands_guide-2.0.0/guia_linux/tools/__init__.py +62 -0
  6. linux_commands_guide-2.0.0/guia_linux/tools/awk.py +39 -0
  7. linux_commands_guide-2.0.0/guia_linux/tools/cat.py +29 -0
  8. linux_commands_guide-2.0.0/guia_linux/tools/chmod.py +28 -0
  9. linux_commands_guide-2.0.0/guia_linux/tools/chown.py +22 -0
  10. linux_commands_guide-2.0.0/guia_linux/tools/crontab.py +40 -0
  11. linux_commands_guide-2.0.0/guia_linux/tools/curl.py +29 -0
  12. linux_commands_guide-2.0.0/guia_linux/tools/cut.py +21 -0
  13. linux_commands_guide-2.0.0/guia_linux/tools/df.py +30 -0
  14. linux_commands_guide-2.0.0/guia_linux/tools/docker.py +39 -0
  15. linux_commands_guide-2.0.0/guia_linux/tools/du.py +32 -0
  16. linux_commands_guide-2.0.0/guia_linux/tools/file_descriptors.py +32 -0
  17. linux_commands_guide-2.0.0/guia_linux/tools/find.py +38 -0
  18. linux_commands_guide-2.0.0/guia_linux/tools/firewall_cmd.py +29 -0
  19. linux_commands_guide-2.0.0/guia_linux/tools/free.py +26 -0
  20. linux_commands_guide-2.0.0/guia_linux/tools/git.py +62 -0
  21. linux_commands_guide-2.0.0/guia_linux/tools/grep.py +39 -0
  22. linux_commands_guide-2.0.0/guia_linux/tools/head.py +23 -0
  23. linux_commands_guide-2.0.0/guia_linux/tools/htop.py +25 -0
  24. linux_commands_guide-2.0.0/guia_linux/tools/ifconfig.py +28 -0
  25. linux_commands_guide-2.0.0/guia_linux/tools/ip.py +32 -0
  26. linux_commands_guide-2.0.0/guia_linux/tools/iptables.py +30 -0
  27. linux_commands_guide-2.0.0/guia_linux/tools/jq.py +32 -0
  28. linux_commands_guide-2.0.0/guia_linux/tools/logs.py +48 -0
  29. linux_commands_guide-2.0.0/guia_linux/tools/lsblk.py +29 -0
  30. linux_commands_guide-2.0.0/guia_linux/tools/lsof.py +30 -0
  31. linux_commands_guide-2.0.0/guia_linux/tools/lxc.py +24 -0
  32. linux_commands_guide-2.0.0/guia_linux/tools/nc.py +27 -0
  33. linux_commands_guide-2.0.0/guia_linux/tools/netstat.py +28 -0
  34. linux_commands_guide-2.0.0/guia_linux/tools/nmap.py +33 -0
  35. linux_commands_guide-2.0.0/guia_linux/tools/ps.py +30 -0
  36. linux_commands_guide-2.0.0/guia_linux/tools/regex.py +38 -0
  37. linux_commands_guide-2.0.0/guia_linux/tools/rsync.py +27 -0
  38. linux_commands_guide-2.0.0/guia_linux/tools/scp.py +26 -0
  39. linux_commands_guide-2.0.0/guia_linux/tools/sed.py +26 -0
  40. linux_commands_guide-2.0.0/guia_linux/tools/shortcuts.py +32 -0
  41. linux_commands_guide-2.0.0/guia_linux/tools/sort.py +24 -0
  42. linux_commands_guide-2.0.0/guia_linux/tools/ss.py +32 -0
  43. linux_commands_guide-2.0.0/guia_linux/tools/ssh.py +30 -0
  44. linux_commands_guide-2.0.0/guia_linux/tools/system.py +54 -0
  45. linux_commands_guide-2.0.0/guia_linux/tools/systemctl.py +34 -0
  46. linux_commands_guide-2.0.0/guia_linux/tools/tail.py +25 -0
  47. linux_commands_guide-2.0.0/guia_linux/tools/tar.py +27 -0
  48. linux_commands_guide-2.0.0/guia_linux/tools/tee.py +20 -0
  49. linux_commands_guide-2.0.0/guia_linux/tools/tmux.py +37 -0
  50. linux_commands_guide-2.0.0/guia_linux/tools/top.py +34 -0
  51. linux_commands_guide-2.0.0/guia_linux/tools/tr.py +23 -0
  52. linux_commands_guide-2.0.0/guia_linux/tools/uname.py +24 -0
  53. linux_commands_guide-2.0.0/guia_linux/tools/uniq.py +21 -0
  54. linux_commands_guide-2.0.0/guia_linux/tools/vim.py +58 -0
  55. linux_commands_guide-2.0.0/guia_linux/tools/watch.py +24 -0
  56. linux_commands_guide-2.0.0/guia_linux/tools/xargs.py +23 -0
  57. linux_commands_guide-2.0.0/guia_linux/utils.py +59 -0
  58. linux_commands_guide-2.0.0/linux_commands_guide.egg-info/PKG-INFO +147 -0
  59. linux_commands_guide-2.0.0/linux_commands_guide.egg-info/SOURCES.txt +63 -0
  60. linux_commands_guide-2.0.0/linux_commands_guide.egg-info/dependency_links.txt +1 -0
  61. linux_commands_guide-2.0.0/linux_commands_guide.egg-info/entry_points.txt +2 -0
  62. linux_commands_guide-2.0.0/linux_commands_guide.egg-info/requires.txt +1 -0
  63. linux_commands_guide-2.0.0/linux_commands_guide.egg-info/top_level.txt +1 -0
  64. linux_commands_guide-2.0.0/pyproject.toml +31 -0
  65. linux_commands_guide-2.0.0/setup.cfg +4 -0
@@ -0,0 +1,147 @@
1
+ Metadata-Version: 2.4
2
+ Name: linux-commands-guide
3
+ Version: 2.0.0
4
+ Summary: Bilingual ES/EN interactive Linux command reference — 50+ tools with keyword search
5
+ Author-email: Serber1990 <serber1990@pm.me>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/serber1990/linux-commands-guide
8
+ Project-URL: Bug Tracker, https://github.com/serber1990/linux-commands-guide/issues
9
+ Project-URL: Source Code, https://github.com/serber1990/linux-commands-guide
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: POSIX :: Linux
12
+ Classifier: Environment :: Console
13
+ Classifier: Topic :: System :: Systems Administration
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ Requires-Dist: shellcolorize
17
+
18
+ # Guia-Comandos-Linux
19
+
20
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
21
+ [![GitHub stars](https://img.shields.io/github/stars/serber1990/Guia-Comandos-Linux?style=social)](https://github.com/serber1990/linux-commands-guide/stargazers)
22
+
23
+ **Bilingual ES/EN interactive Linux command reference for the terminal.** 50+ tools covered, keyword search across all of them, pip-installable with a single `lh` command.
24
+
25
+ ---
26
+
27
+ ## ✨ Features
28
+
29
+ - 🌐 **Bilingual** — full Spanish and English descriptions via `--lang en` / `--lang es`
30
+ - 🔍 **Cross-tool search** — `lh -s recursive` finds every command mentioning "recursive" across all tools
31
+ - 📦 **50+ tools** — awk, grep, find, git, docker, ssh, tmux, jq, ss, rsync, tar, crontab and many more
32
+ - 🚀 **pip-installable** — one command, available anywhere in your shell as `lh`
33
+
34
+ ---
35
+
36
+ ## 📥 Installation
37
+
38
+ ```bash
39
+ pip install guia-linux
40
+ ```
41
+
42
+ Or clone and install in development mode:
43
+
44
+ ```bash
45
+ git clone https://github.com/serber1990/linux-commands-guide.git
46
+ cd Guia-Comandos-Linux
47
+ pip install -e .
48
+ ```
49
+
50
+ ---
51
+
52
+ ## 🛠 Usage
53
+
54
+ ```bash
55
+ lh <tool> # Show commands for a tool (Spanish by default)
56
+ lh --lang en <tool> # Force English output
57
+ lh -s <keyword> # Search across all tools
58
+ lh -s <keyword> --lang en # Search in English
59
+ lh --help # Show help and full tool list
60
+ ```
61
+
62
+ ### Examples
63
+
64
+ ```bash
65
+ lh grep # All grep options in Spanish
66
+ lh --lang en grep # All grep options in English
67
+ lh -s recursive # Find every command mentioning "recursive"
68
+ lh -s port --lang en # Find port-related commands (English descriptions)
69
+ lh ssh
70
+ lh docker
71
+ lh tmux
72
+ lh jq
73
+ ```
74
+
75
+ ---
76
+
77
+ ## 🔧 Available Tools
78
+
79
+ | Tool | Description |
80
+ |------|-------------|
81
+ | `awk` | Column-based text processing |
82
+ | `cat` | Display and concatenate file contents |
83
+ | `chmod` | Change file permissions |
84
+ | `chown` | Change file owner and group |
85
+ | `crontab` | Periodic task scheduling |
86
+ | `curl` | Transfer data with URLs |
87
+ | `cut` | Extract sections from each line |
88
+ | `df` | Display disk space usage |
89
+ | `docker` | Docker container management |
90
+ | `du` | Display directory space usage |
91
+ | `descriptors` | File descriptors and redirections |
92
+ | `find` | Search for files and directories |
93
+ | `firewall-cmd` | Manage the firewalld firewall |
94
+ | `free` | Display system memory usage |
95
+ | `git` | Version control with Git |
96
+ | `grep` | Search for patterns in files |
97
+ | `head` | Display the beginning of a file |
98
+ | `htop` | Interactive process monitor |
99
+ | `ifconfig` | Network interface configuration (legacy) |
100
+ | `ip` | Modern network interface and routing management |
101
+ | `iptables` | Kernel firewall rule management |
102
+ | `jq` | Command-line JSON processor |
103
+ | `logs` | Important log file paths in Linux |
104
+ | `lsblk` | List block devices |
105
+ | `lsof` | List open files by processes |
106
+ | `lxc` | LXC container management |
107
+ | `nc` | TCP/IP Swiss army knife |
108
+ | `netstat` | Network connection statistics |
109
+ | `nmap` | Network and port scanner |
110
+ | `ps` | Information about running processes |
111
+ | `regex` | Regular expression patterns |
112
+ | `rsync` | Efficient file synchronization |
113
+ | `scp` | Secure file copy over SSH |
114
+ | `sed` | Stream text editor |
115
+ | `shortcuts` | Terminal keyboard shortcuts |
116
+ | `sort` | Sort lines of text |
117
+ | `ss` | Socket statistics (replaces netstat) |
118
+ | `ssh` | Secure Shell client |
119
+ | `system` | Basic system commands |
120
+ | `systemctl` | Manage services with systemd |
121
+ | `tail` | Display the end of a file |
122
+ | `tar` | File archiving and compression |
123
+ | `tee` | Read stdin and write to stdout and files |
124
+ | `tmux` | Terminal multiplexer |
125
+ | `top` | Real-time process monitor |
126
+ | `tr` | Translate or delete characters |
127
+ | `uname` | System and kernel information |
128
+ | `uniq` | Filter adjacent duplicate lines |
129
+ | `vim` | Modal terminal text editor |
130
+ | `watch` | Execute a command periodically |
131
+ | `xargs` | Build and execute commands from stdin |
132
+
133
+ ---
134
+
135
+ ## 📝 License
136
+
137
+ MIT — see [LICENSE](LICENSE).
138
+
139
+ ---
140
+
141
+ ## 💬 Feedback
142
+
143
+ Open an issue or reach out via GitHub.
144
+
145
+ ## 🌐 Connect
146
+
147
+ [![GitHub](https://img.shields.io/badge/GitHub-@serber1990-181717?style=flat-square&logo=github)](https://github.com/serber1990)
@@ -0,0 +1,130 @@
1
+ # Guia-Comandos-Linux
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
4
+ [![GitHub stars](https://img.shields.io/github/stars/serber1990/Guia-Comandos-Linux?style=social)](https://github.com/serber1990/linux-commands-guide/stargazers)
5
+
6
+ **Bilingual ES/EN interactive Linux command reference for the terminal.** 50+ tools covered, keyword search across all of them, pip-installable with a single `lh` command.
7
+
8
+ ---
9
+
10
+ ## ✨ Features
11
+
12
+ - 🌐 **Bilingual** — full Spanish and English descriptions via `--lang en` / `--lang es`
13
+ - 🔍 **Cross-tool search** — `lh -s recursive` finds every command mentioning "recursive" across all tools
14
+ - 📦 **50+ tools** — awk, grep, find, git, docker, ssh, tmux, jq, ss, rsync, tar, crontab and many more
15
+ - 🚀 **pip-installable** — one command, available anywhere in your shell as `lh`
16
+
17
+ ---
18
+
19
+ ## 📥 Installation
20
+
21
+ ```bash
22
+ pip install guia-linux
23
+ ```
24
+
25
+ Or clone and install in development mode:
26
+
27
+ ```bash
28
+ git clone https://github.com/serber1990/linux-commands-guide.git
29
+ cd Guia-Comandos-Linux
30
+ pip install -e .
31
+ ```
32
+
33
+ ---
34
+
35
+ ## 🛠 Usage
36
+
37
+ ```bash
38
+ lh <tool> # Show commands for a tool (Spanish by default)
39
+ lh --lang en <tool> # Force English output
40
+ lh -s <keyword> # Search across all tools
41
+ lh -s <keyword> --lang en # Search in English
42
+ lh --help # Show help and full tool list
43
+ ```
44
+
45
+ ### Examples
46
+
47
+ ```bash
48
+ lh grep # All grep options in Spanish
49
+ lh --lang en grep # All grep options in English
50
+ lh -s recursive # Find every command mentioning "recursive"
51
+ lh -s port --lang en # Find port-related commands (English descriptions)
52
+ lh ssh
53
+ lh docker
54
+ lh tmux
55
+ lh jq
56
+ ```
57
+
58
+ ---
59
+
60
+ ## 🔧 Available Tools
61
+
62
+ | Tool | Description |
63
+ |------|-------------|
64
+ | `awk` | Column-based text processing |
65
+ | `cat` | Display and concatenate file contents |
66
+ | `chmod` | Change file permissions |
67
+ | `chown` | Change file owner and group |
68
+ | `crontab` | Periodic task scheduling |
69
+ | `curl` | Transfer data with URLs |
70
+ | `cut` | Extract sections from each line |
71
+ | `df` | Display disk space usage |
72
+ | `docker` | Docker container management |
73
+ | `du` | Display directory space usage |
74
+ | `descriptors` | File descriptors and redirections |
75
+ | `find` | Search for files and directories |
76
+ | `firewall-cmd` | Manage the firewalld firewall |
77
+ | `free` | Display system memory usage |
78
+ | `git` | Version control with Git |
79
+ | `grep` | Search for patterns in files |
80
+ | `head` | Display the beginning of a file |
81
+ | `htop` | Interactive process monitor |
82
+ | `ifconfig` | Network interface configuration (legacy) |
83
+ | `ip` | Modern network interface and routing management |
84
+ | `iptables` | Kernel firewall rule management |
85
+ | `jq` | Command-line JSON processor |
86
+ | `logs` | Important log file paths in Linux |
87
+ | `lsblk` | List block devices |
88
+ | `lsof` | List open files by processes |
89
+ | `lxc` | LXC container management |
90
+ | `nc` | TCP/IP Swiss army knife |
91
+ | `netstat` | Network connection statistics |
92
+ | `nmap` | Network and port scanner |
93
+ | `ps` | Information about running processes |
94
+ | `regex` | Regular expression patterns |
95
+ | `rsync` | Efficient file synchronization |
96
+ | `scp` | Secure file copy over SSH |
97
+ | `sed` | Stream text editor |
98
+ | `shortcuts` | Terminal keyboard shortcuts |
99
+ | `sort` | Sort lines of text |
100
+ | `ss` | Socket statistics (replaces netstat) |
101
+ | `ssh` | Secure Shell client |
102
+ | `system` | Basic system commands |
103
+ | `systemctl` | Manage services with systemd |
104
+ | `tail` | Display the end of a file |
105
+ | `tar` | File archiving and compression |
106
+ | `tee` | Read stdin and write to stdout and files |
107
+ | `tmux` | Terminal multiplexer |
108
+ | `top` | Real-time process monitor |
109
+ | `tr` | Translate or delete characters |
110
+ | `uname` | System and kernel information |
111
+ | `uniq` | Filter adjacent duplicate lines |
112
+ | `vim` | Modal terminal text editor |
113
+ | `watch` | Execute a command periodically |
114
+ | `xargs` | Build and execute commands from stdin |
115
+
116
+ ---
117
+
118
+ ## 📝 License
119
+
120
+ MIT — see [LICENSE](LICENSE).
121
+
122
+ ---
123
+
124
+ ## 💬 Feedback
125
+
126
+ Open an issue or reach out via GitHub.
127
+
128
+ ## 🌐 Connect
129
+
130
+ [![GitHub](https://img.shields.io/badge/GitHub-@serber1990-181717?style=flat-square&logo=github)](https://github.com/serber1990)
@@ -0,0 +1,4 @@
1
+ from guia_linux.cli import main
2
+
3
+ __version__ = "2.0.0"
4
+ __all__ = ["main"]
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env python3
2
+ import argparse
3
+ import sys
4
+ from shellcolorize import Color
5
+ from guia_linux.tools import TOOLS
6
+ from guia_linux.utils import search_all, strip_ansi
7
+
8
+
9
+ def _print_help(lang: str) -> None:
10
+ if lang == "en":
11
+ print(f"\n{Color.CYAN}{Color.BOLD}Linux Command Reference{Color.RESET} — usage:\n")
12
+ print(f" {Color.GREEN}lh{Color.RESET} <tool> Show commands for a tool")
13
+ print(f" {Color.GREEN}lh{Color.RESET} -s <keyword> Search across all tools")
14
+ print(f" {Color.GREEN}lh{Color.RESET} --lang en <tool> Force English output")
15
+ print(f" {Color.GREEN}lh{Color.RESET} --lang es <tool> Force Spanish output\n")
16
+ else:
17
+ print(f"\n{Color.CYAN}{Color.BOLD}Guía de Comandos Linux{Color.RESET} — uso:\n")
18
+ print(f" {Color.GREEN}lh{Color.RESET} <herramienta> Muestra comandos de una herramienta")
19
+ print(f" {Color.GREEN}lh{Color.RESET} -s <término> Busca en todas las herramientas")
20
+ print(f" {Color.GREEN}lh{Color.RESET} --lang en <tool> Fuerza salida en inglés")
21
+ print(f" {Color.GREEN}lh{Color.RESET} --lang es <tool> Fuerza salida en español\n")
22
+
23
+ label_tool = "Tool" if lang == "en" else "Herramienta"
24
+ label_desc = "Description" if lang == "en" else "Descripción"
25
+ print(f" {Color.YELLOW}{label_tool:<16}{label_desc}{Color.RESET}")
26
+ print(f" {'-' * 60}")
27
+ for name, module in sorted(TOOLS.items()):
28
+ desc = getattr(module, 'TITLE_EN' if lang == 'en' else 'TITLE', name.upper())
29
+ brief = getattr(module, 'BRIEF_EN' if lang == 'en' else 'BRIEF', '')
30
+ print(f" {Color.GREEN}{name:<16}{Color.RESET}{brief}")
31
+ print()
32
+
33
+
34
+ def _search(query: str, lang: str) -> None:
35
+ results = search_all(query, TOOLS, lang)
36
+ desc_key = "description_en" if lang == "en" else "description"
37
+ if not results:
38
+ msg = f"No results for '{query}'" if lang == "en" else f"Sin resultados para '{query}'"
39
+ print(f"\n{Color.RED}{msg}{Color.RESET}\n")
40
+ return
41
+
42
+ header = f"Results for '{query}'" if lang == "en" else f"Resultados para '{query}'"
43
+ print(f"\n{Color.CYAN}{Color.BOLD}{header}{Color.RESET} ({len(results)}):\n")
44
+ current_tool = None
45
+ for tool_name, entry in results:
46
+ if tool_name != current_tool:
47
+ print(f"\n {Color.YELLOW}[{tool_name}]{Color.RESET}")
48
+ current_tool = tool_name
49
+ display = str(entry.get("command") or entry.get("logfile") or entry.get("pattern") or "")
50
+ desc = entry.get(desc_key, "")
51
+ clean = strip_ansi(display)
52
+ print(f" {Color.GREEN}{clean}{Color.RESET}")
53
+ print(f" {Color.RED}{desc}{Color.RESET}")
54
+ print()
55
+
56
+
57
+ def main() -> None:
58
+ parser = argparse.ArgumentParser(add_help=False)
59
+ parser.add_argument("tool", nargs="?", default=None)
60
+ parser.add_argument("-s", "--search", metavar="KEYWORD", default=None)
61
+ parser.add_argument("--lang", choices=["es", "en"], default="es")
62
+ parser.add_argument("-h", "--help", action="store_true")
63
+ args = parser.parse_args()
64
+
65
+ lang = args.lang
66
+
67
+ if args.help or (args.tool is None and args.search is None):
68
+ _print_help(lang)
69
+ return
70
+
71
+ if args.search:
72
+ _search(args.search, lang)
73
+ return
74
+
75
+ tool_key = args.tool.lower()
76
+ if tool_key not in TOOLS:
77
+ msg = (
78
+ f"Tool '{args.tool}' not found. Run 'lh --help' for the full list."
79
+ if lang == "en"
80
+ else f"Herramienta '{args.tool}' no encontrada. Ejecuta 'lh --help' para ver la lista."
81
+ )
82
+ print(f"\n{Color.RED}{msg}{Color.RESET}\n")
83
+ sys.exit(1)
84
+
85
+ TOOLS[tool_key].show(lang)
86
+
87
+
88
+ if __name__ == "__main__":
89
+ main()
@@ -0,0 +1,62 @@
1
+ from guia_linux.tools import (
2
+ awk, cat, chmod, chown, crontab, curl, cut, df, docker, du,
3
+ file_descriptors, find, firewall_cmd, free, git, grep, head,
4
+ htop, ifconfig, ip, iptables, jq, logs, lsblk, lsof, lxc,
5
+ nc, netstat, nmap, ps, regex, rsync, scp, sed, shortcuts,
6
+ sort, ss, ssh, system, systemctl, tail, tar, tee, tmux,
7
+ top, tr, uname, uniq, vim, watch, xargs,
8
+ )
9
+
10
+ TOOLS = {
11
+ "awk": awk,
12
+ "cat": cat,
13
+ "chmod": chmod,
14
+ "chown": chown,
15
+ "crontab": crontab,
16
+ "curl": curl,
17
+ "cut": cut,
18
+ "df": df,
19
+ "docker": docker,
20
+ "du": du,
21
+ "descriptors": file_descriptors,
22
+ "find": find,
23
+ "firewall-cmd": firewall_cmd,
24
+ "free": free,
25
+ "git": git,
26
+ "grep": grep,
27
+ "head": head,
28
+ "htop": htop,
29
+ "ifconfig": ifconfig,
30
+ "ip": ip,
31
+ "iptables": iptables,
32
+ "jq": jq,
33
+ "logs": logs,
34
+ "lsblk": lsblk,
35
+ "lsof": lsof,
36
+ "lxc": lxc,
37
+ "nc": nc,
38
+ "netstat": netstat,
39
+ "nmap": nmap,
40
+ "ps": ps,
41
+ "regex": regex,
42
+ "rsync": rsync,
43
+ "scp": scp,
44
+ "sed": sed,
45
+ "shortcuts": shortcuts,
46
+ "sort": sort,
47
+ "ss": ss,
48
+ "ssh": ssh,
49
+ "system": system,
50
+ "systemctl": systemctl,
51
+ "tail": tail,
52
+ "tar": tar,
53
+ "tee": tee,
54
+ "tmux": tmux,
55
+ "top": top,
56
+ "tr": tr,
57
+ "uname": uname,
58
+ "uniq": uniq,
59
+ "vim": vim,
60
+ "watch": watch,
61
+ "xargs": xargs,
62
+ }
@@ -0,0 +1,39 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de AWK"
5
+ TITLE_EN = "AWK Options"
6
+ BRIEF = "Procesamiento de texto por columnas"
7
+ BRIEF_EN = "Column-based text processing"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{print $1}}' filename", "description": "Imprime la primera columna de cada línea", "description_en": "Print the first column of each line"},
11
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{print $1, $3}}' filename", "description": "Imprime la primera y tercera columna", "description_en": "Print the first and third columns"},
12
+ {"command": f"{Color.GREEN}awk{Color.RESET} '$3 > 100' filename", "description": "Imprime líneas donde la tercera columna > 100", "description_en": "Print lines where the third column > 100"},
13
+ {"command": f"{Color.GREEN}awk{Color.RESET} -F',' '{{print $1}}' filename", "description": "Usa ',' como delimitador de campo", "description_en": "Use ',' as field delimiter"},
14
+ {"command": f"{Color.GREEN}awk{Color.RESET} 'NR==5' filename", "description": "Imprime solo la quinta línea", "description_en": "Print only the fifth line"},
15
+ {"command": f"{Color.GREEN}awk{Color.RESET} 'NR>5 && NR<10' filename", "description": "Imprime las líneas del 6 al 9", "description_en": "Print lines 6 through 9"},
16
+ {"command": f"{Color.GREEN}awk{Color.RESET} '/word/' filename", "description": "Imprime líneas que contienen 'word'", "description_en": "Print lines containing 'word'"},
17
+ {"command": f"{Color.GREEN}awk{Color.RESET} '!/word/' filename", "description": "Imprime líneas que NO contienen 'word'", "description_en": "Print lines NOT containing 'word'"},
18
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{sum+=$1}} END {{print sum}}' filename", "description": "Suma la primera columna", "description_en": "Sum the first column"},
19
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{count++}} END {{print count}}' filename", "description": "Cuenta el número de líneas", "description_en": "Count the number of lines"},
20
+ {"command": f"{Color.GREEN}awk{Color.RESET} 'BEGIN {{print \"Start\"}}' filename", "description": "Imprime texto antes de procesar", "description_en": "Print text before processing"},
21
+ {"command": f"{Color.GREEN}awk{Color.RESET} 'END {{print \"End\"}}' filename", "description": "Imprime texto después de procesar", "description_en": "Print text after processing"},
22
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{print NR, $0}}' filename", "description": "Imprime número de línea seguido de la línea completa", "description_en": "Print line number followed by full line"},
23
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{print NF}}' filename", "description": "Imprime el número de campos de cada línea", "description_en": "Print the number of fields per line"},
24
+ {"command": f"{Color.GREEN}awk{Color.RESET} '$1 ~ /regex/' filename", "description": "Imprime líneas donde el campo 1 coincide con regex", "description_en": "Print lines where field 1 matches regex"},
25
+ {"command": f"{Color.GREEN}awk{Color.RESET} 'length($0) > 20' filename", "description": "Imprime líneas con más de 20 caracteres", "description_en": "Print lines longer than 20 characters"},
26
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{print tolower($0)}}' filename", "description": "Convierte a minúsculas", "description_en": "Convert to lowercase"},
27
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{print toupper($0)}}' filename", "description": "Convierte a mayúsculas", "description_en": "Convert to uppercase"},
28
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{sub(/old/,\"new\"); print}}' filename", "description": "Reemplaza la primera ocurrencia de 'old' por 'new'", "description_en": "Replace first occurrence of 'old' with 'new'"},
29
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{gsub(/old/,\"new\"); print}}' filename", "description": "Reemplaza todas las ocurrencias de 'old' por 'new'", "description_en": "Replace all occurrences of 'old' with 'new'"},
30
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{if ($1>50) print $1}}' filename", "description": "Imprime campo 1 solo si es mayor a 50", "description_en": "Print field 1 only if greater than 50"},
31
+ {"command": f"{Color.GREEN}awk{Color.RESET} 'BEGIN {{OFS=\",\"}} {{print $1,$2}}' filename", "description": "Usa ',' como separador de salida", "description_en": "Use ',' as output field separator"},
32
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{total+=$3}} END {{print total/NR}}' filename", "description": "Calcula el promedio de la tercera columna", "description_en": "Calculate the average of the third column"},
33
+ {"command": f"{Color.GREEN}awk{Color.RESET} '{{if ($2>max) max=$2}} END {{print max}}' filename", "description": "Encuentra el valor máximo de la segunda columna", "description_en": "Find the maximum value of the second column"},
34
+ ]
35
+
36
+
37
+ def show(lang: str = "es") -> None:
38
+ title = TITLE_EN if lang == "en" else TITLE
39
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,29 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de CAT"
5
+ TITLE_EN = "CAT Options"
6
+ BRIEF = "Muestra y concatena contenido de archivos"
7
+ BRIEF_EN = "Display and concatenate file contents"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}cat{Color.RESET} filename", "description": "Muestra el contenido del archivo", "description_en": "Display file contents"},
11
+ {"command": f"{Color.GREEN}cat{Color.RESET} file1 file2 > output", "description": "Concatena file1 y file2 en output", "description_en": "Concatenate file1 and file2 into output"},
12
+ {"command": f"{Color.GREEN}cat{Color.RESET} -n filename", "description": "Muestra el contenido con números de línea", "description_en": "Show content with line numbers"},
13
+ {"command": f"{Color.GREEN}cat{Color.RESET} -b filename", "description": "Numera solo las líneas no vacías", "description_en": "Number only non-empty lines"},
14
+ {"command": f"{Color.GREEN}cat{Color.RESET} -s filename", "description": "Suprime líneas vacías consecutivas", "description_en": "Squeeze consecutive blank lines"},
15
+ {"command": f"{Color.GREEN}cat{Color.RESET} -T filename", "description": "Muestra tabulaciones como ^I", "description_en": "Show tabs as ^I"},
16
+ {"command": f"{Color.GREEN}cat{Color.RESET} -E filename", "description": "Muestra $ al final de cada línea", "description_en": "Show $ at end of each line"},
17
+ {"command": f"{Color.GREEN}cat{Color.RESET} -v filename", "description": "Muestra caracteres no imprimibles", "description_en": "Show non-printable characters"},
18
+ {"command": f"{Color.GREEN}cat{Color.RESET} -A filename", "description": "Muestra todos los caracteres especiales", "description_en": "Show all special characters"},
19
+ {"command": f"{Color.GREEN}cat{Color.RESET} -r, --line-range N:M filename", "description": "Muestra solo las líneas N a M (batcat)", "description_en": "Show only lines N to M (batcat)"},
20
+ {"command": f"{Color.GREEN}cat{Color.RESET} --theme <theme>", "description": "Establece el tema de resaltado de sintaxis (batcat)", "description_en": "Set syntax-highlighting theme (batcat)"},
21
+ {"command": f"{Color.GREEN}cat{Color.RESET} --paging never filename", "description": "Desactiva el paginador en batcat", "description_en": "Disable pager in batcat"},
22
+ {"command": f"{Color.GREEN}cat{Color.RESET} -u, --unbuffered", "description": "Desactiva el buffering (compatibilidad POSIX)", "description_en": "Disable buffering (POSIX compatibility)"},
23
+ {"command": f"{Color.GREEN}cat{Color.RESET} -L, --list-languages", "description": "Lista los lenguajes soportados para resaltado", "description_en": "List supported syntax-highlighting languages"},
24
+ ]
25
+
26
+
27
+ def show(lang: str = "es") -> None:
28
+ title = TITLE_EN if lang == "en" else TITLE
29
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,28 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de CHMOD"
5
+ TITLE_EN = "CHMOD Options"
6
+ BRIEF = "Cambia permisos de archivos y directorios"
7
+ BRIEF_EN = "Change file and directory permissions"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}chmod{Color.RESET} 755 filename", "description": "rwx para propietario, rx para grupo y otros", "description_en": "rwx for owner, rx for group and others"},
11
+ {"command": f"{Color.GREEN}chmod{Color.RESET} 644 filename", "description": "rw para propietario, r para grupo y otros", "description_en": "rw for owner, r for group and others"},
12
+ {"command": f"{Color.GREEN}chmod{Color.RESET} +x filename", "description": "Añade permiso de ejecución a todos", "description_en": "Add execute permission for everyone"},
13
+ {"command": f"{Color.GREEN}chmod{Color.RESET} -x filename", "description": "Revoca permiso de ejecución a todos", "description_en": "Remove execute permission for everyone"},
14
+ {"command": f"{Color.GREEN}chmod{Color.RESET} u+w filename", "description": "Añade escritura solo al propietario", "description_en": "Add write permission for owner only"},
15
+ {"command": f"{Color.GREEN}chmod{Color.RESET} g-w filename", "description": "Revoca escritura al grupo", "description_en": "Remove write permission from group"},
16
+ {"command": f"{Color.GREEN}chmod{Color.RESET} o+r filename", "description": "Añade lectura a otros", "description_en": "Add read permission for others"},
17
+ {"command": f"{Color.GREEN}chmod{Color.RESET} u=rwx,g=rx,o= filename", "description": "Permisos exactos para cada categoría", "description_en": "Set exact permissions per category"},
18
+ {"command": f"{Color.GREEN}chmod{Color.RESET} -R 755 directory", "description": "Aplica permisos recursivamente", "description_en": "Apply permissions recursively"},
19
+ {"command": f"{Color.GREEN}chmod{Color.RESET} a+x filename", "description": "Añade ejecución para todos (all)", "description_en": "Add execute for all (all)"},
20
+ {"command": f"{Color.GREEN}chmod{Color.RESET} ug=rw filename", "description": "Lectura y escritura para propietario y grupo", "description_en": "Read and write for owner and group"},
21
+ {"command": f"{Color.GREEN}chmod{Color.RESET} 400 filename", "description": "Solo lectura para el propietario", "description_en": "Read-only for owner"},
22
+ {"command": f"{Color.GREEN}chmod{Color.RESET} 777 filename", "description": "Todos los permisos para todos los usuarios", "description_en": "All permissions for all users"},
23
+ ]
24
+
25
+
26
+ def show(lang: str = "es") -> None:
27
+ title = TITLE_EN if lang == "en" else TITLE
28
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,22 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de CHOWN"
5
+ TITLE_EN = "CHOWN Options"
6
+ BRIEF = "Cambia propietario y grupo de archivos"
7
+ BRIEF_EN = "Change file owner and group"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}chown{Color.RESET} user filename", "description": "Cambia el propietario a 'user'", "description_en": "Change owner to 'user'"},
11
+ {"command": f"{Color.GREEN}chown{Color.RESET} user:group filename", "description": "Cambia propietario y grupo", "description_en": "Change owner and group"},
12
+ {"command": f"{Color.GREEN}chown{Color.RESET} :group filename", "description": "Cambia solo el grupo", "description_en": "Change group only"},
13
+ {"command": f"{Color.GREEN}chown{Color.RESET} -R user directory", "description": "Cambia propietario recursivamente", "description_en": "Change owner recursively"},
14
+ {"command": f"{Color.GREEN}chown{Color.RESET} -R user:group directory", "description": "Cambia propietario y grupo recursivamente", "description_en": "Change owner and group recursively"},
15
+ {"command": f"{Color.GREEN}chown{Color.RESET} --from=old_user:new_user filename", "description": "Cambia solo si coincide con el propietario actual", "description_en": "Change only if current owner matches"},
16
+ {"command": f"{Color.GREEN}chown{Color.RESET} --reference=ref_file filename", "description": "Copia propietario y grupo de otro archivo", "description_en": "Copy owner and group from another file"},
17
+ ]
18
+
19
+
20
+ def show(lang: str = "es") -> None:
21
+ title = TITLE_EN if lang == "en" else TITLE
22
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,40 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de CRONTAB"
5
+ TITLE_EN = "CRONTAB Options"
6
+ BRIEF = "Programación de tareas periódicas"
7
+ BRIEF_EN = "Periodic task scheduling"
8
+
9
+ COMMANDS = [
10
+ {"section": "Gestión de crontab", "section_en": "Crontab Management"},
11
+ {"command": f"{Color.GREEN}crontab{Color.RESET} -e", "description": "Edita el crontab del usuario actual", "description_en": "Edit the current user's crontab"},
12
+ {"command": f"{Color.GREEN}crontab{Color.RESET} -l", "description": "Lista las tareas del crontab actual", "description_en": "List current crontab entries"},
13
+ {"command": f"{Color.GREEN}crontab{Color.RESET} -r", "description": "Elimina el crontab del usuario actual", "description_en": "Remove the current user's crontab"},
14
+ {"command": f"{Color.GREEN}crontab{Color.RESET} -u user -l", "description": "Lista el crontab de otro usuario (requiere root)", "description_en": "List another user's crontab (requires root)"},
15
+ {"command": f"{Color.GREEN}crontab{Color.RESET} file.cron", "description": "Instala un crontab desde un archivo", "description_en": "Install a crontab from a file"},
16
+
17
+ {"section": "Sintaxis de los campos [min hora día mes día_semana]", "section_en": "Field Syntax [min hour day month weekday]"},
18
+ {"command": f"{Color.YELLOW}* * * * *{Color.RESET} command", "description": "Ejecuta cada minuto", "description_en": "Run every minute"},
19
+ {"command": f"{Color.YELLOW}0 * * * *{Color.RESET} command", "description": "Ejecuta cada hora (al minuto 0)", "description_en": "Run every hour (at minute 0)"},
20
+ {"command": f"{Color.YELLOW}0 0 * * *{Color.RESET} command", "description": "Ejecuta cada día a medianoche", "description_en": "Run every day at midnight"},
21
+ {"command": f"{Color.YELLOW}0 9 * * 1{Color.RESET} command", "description": "Ejecuta cada lunes a las 9:00", "description_en": "Run every Monday at 9:00"},
22
+ {"command": f"{Color.YELLOW}0 0 1 * *{Color.RESET} command", "description": "Ejecuta el primer día de cada mes", "description_en": "Run on the first day of every month"},
23
+ {"command": f"{Color.YELLOW}*/15 * * * *{Color.RESET} command", "description": "Ejecuta cada 15 minutos", "description_en": "Run every 15 minutes"},
24
+ {"command": f"{Color.YELLOW}0 8-18 * * 1-5{Color.RESET} command", "description": "Ejecuta cada hora de 8 a 18, de lunes a viernes", "description_en": "Run hourly from 8 to 18, Monday to Friday"},
25
+ {"command": f"{Color.YELLOW}30 23 * * 0,6{Color.RESET} command", "description": "Ejecuta a las 23:30 los sábados y domingos", "description_en": "Run at 23:30 on Saturdays and Sundays"},
26
+
27
+ {"section": "Variables especiales", "section_en": "Special Variables"},
28
+ {"command": f"{Color.GREEN}MAILTO{Color.RESET}=user@example.com", "description": "Envía la salida por correo al usuario especificado", "description_en": "Send output by email to the specified user"},
29
+ {"command": f"{Color.GREEN}PATH{Color.RESET}=/usr/local/bin:/usr/bin:/bin", "description": "Define el PATH para los comandos del crontab", "description_en": "Set PATH for crontab commands"},
30
+ {"command": f"{Color.GREEN}@reboot{Color.RESET} command", "description": "Ejecuta el comando al arrancar el sistema", "description_en": "Run command at system boot"},
31
+ {"command": f"{Color.GREEN}@hourly{Color.RESET} command", "description": "Alias de '0 * * * *'", "description_en": "Alias for '0 * * * *'"},
32
+ {"command": f"{Color.GREEN}@daily{Color.RESET} command", "description": "Alias de '0 0 * * *'", "description_en": "Alias for '0 0 * * *'"},
33
+ {"command": f"{Color.GREEN}@weekly{Color.RESET} command", "description": "Alias de '0 0 * * 0'", "description_en": "Alias for '0 0 * * 0'"},
34
+ {"command": f"{Color.GREEN}@monthly{Color.RESET} command", "description": "Alias de '0 0 1 * *'", "description_en": "Alias for '0 0 1 * *'"},
35
+ ]
36
+
37
+
38
+ def show(lang: str = "es") -> None:
39
+ title = TITLE_EN if lang == "en" else TITLE
40
+ print_table(title, COMMANDS, lang)
@@ -0,0 +1,29 @@
1
+ from shellcolorize import Color
2
+ from guia_linux.utils import print_table
3
+
4
+ TITLE = "Opciones de CURL"
5
+ TITLE_EN = "CURL Options"
6
+ BRIEF = "Transfiere datos con URLs"
7
+ BRIEF_EN = "Transfer data with URLs"
8
+
9
+ COMMANDS = [
10
+ {"command": f"{Color.GREEN}curl{Color.RESET} https://example.com", "description": "Realiza una petición HTTP GET", "description_en": "Perform an HTTP GET request"},
11
+ {"command": f"{Color.GREEN}curl{Color.RESET} -I https://example.com", "description": "Muestra solo los encabezados de respuesta (HEAD)", "description_en": "Show only response headers (HEAD)"},
12
+ {"command": f"{Color.GREEN}curl{Color.RESET} -o file.txt https://example.com/file", "description": "Guarda la respuesta en un archivo", "description_en": "Save response to a file"},
13
+ {"command": f"{Color.GREEN}curl{Color.RESET} -O https://example.com/file.zip", "description": "Guarda con el nombre original del archivo", "description_en": "Save with the original filename"},
14
+ {"command": f"{Color.GREEN}curl{Color.RESET} -L https://example.com", "description": "Sigue redirecciones HTTP", "description_en": "Follow HTTP redirects"},
15
+ {"command": f"{Color.GREEN}curl{Color.RESET} -u user:pass https://example.com", "description": "Autenticación básica HTTP", "description_en": "HTTP basic authentication"},
16
+ {"command": f"{Color.GREEN}curl{Color.RESET} -d 'key=value' https://example.com", "description": "Envía datos POST", "description_en": "Send POST data"},
17
+ {"command": f"{Color.GREEN}curl{Color.RESET} -H 'Content-Type: application/json' URL", "description": "Añade una cabecera personalizada", "description_en": "Add a custom request header"},
18
+ {"command": f"{Color.GREEN}curl{Color.RESET} -X PUT https://example.com", "description": "Usa el método HTTP especificado", "description_en": "Use the specified HTTP method"},
19
+ {"command": f"{Color.GREEN}curl{Color.RESET} -s https://example.com", "description": "Modo silencioso — sin barra de progreso", "description_en": "Silent mode — no progress bar"},
20
+ {"command": f"{Color.GREEN}curl{Color.RESET} -v https://example.com", "description": "Modo verbose — muestra detalles de la conexión", "description_en": "Verbose mode — show connection details"},
21
+ {"command": f"{Color.GREEN}curl{Color.RESET} -k https://self-signed.example.com", "description": "Acepta certificados SSL no verificados", "description_en": "Accept unverified SSL certificates"},
22
+ {"command": f"{Color.GREEN}curl{Color.RESET} --limit-rate 100K https://example.com", "description": "Limita la velocidad de transferencia", "description_en": "Limit transfer speed"},
23
+ {"command": f"{Color.GREEN}curl{Color.RESET} -x proxy:8080 https://example.com", "description": "Usa un proxy HTTP", "description_en": "Use an HTTP proxy"},
24
+ ]
25
+
26
+
27
+ def show(lang: str = "es") -> None:
28
+ title = TITLE_EN if lang == "en" else TITLE
29
+ print_table(title, COMMANDS, lang)