作为 Linux 或 Windows 系统管理员工作时,您绝对应该了解哪些工具/实用程序。
我正在考虑例如在 Linux 服务器上工作时需要的GNU/screen。
Edd*_*die 34
作为 Windows 系统管理员,您绝对需要熟悉SysInternals。对于编程和诊断机器正在发生的事情,这些都是非常宝贵的。
Vag*_*err 25
vi - 我知道不是每个人都喜欢它,但是它几乎可以在您遇到的任何 *nix 服务器上使用,当其他一切都损坏时,您将需要编辑配置文件。出于同样的原因,我也建议使用 csh 和 sh
mac*_*die 14
脚本。
我了解到即使是 Windows 的标准命令 shell 也非常有用。无需安装 PowerShell 或 cygwin 即可获得不错的脚本功能,尤其是当脚本应该部署在客户端计算机上时。
有大量有用的小型 unix/linux 工具
grep、strace、GNU Screen、locate、rsync、sed、awk 和 tripwire 也很有趣。
这个列表真的不胜枚举,我肯定忘记的不仅仅是这里的列表。此外,了解如何以您想要的方式配置这些工具,例如配置 .*rc 文件。这将使它们更加有用。例如,这是我的 .screenrc 文件,因为您似乎对 screen 感兴趣。
1 startup_message off
2 hardstatus alwayslastline
3 hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
4
5 # Window numbering starts at 1, not 0.
6 bind c screen 1
7 bind 0 select 10
8
9 # Default screens
10 screen -t shell1 1
11 screen -t shell2 2
12 screen -t shell3 3
Run Code Online (Sandbox Code Playgroud)
在任何平台上,您都应该熟悉本机和流行的备份工具。没有什么比不知道如何进行良好备份的系统管理员更让我烦恼的了。一个好的备份将使您免于犯下几乎任何错误。
-ntbackup 在 windows 上,dd/tar 在 Linux 上 -database dump 命令 -tftp 备份交换机/路由器/设备
shell 脚本工具:bash/sh、awk、grep、head、tail、less、cat、sort、uniq、wc(和其他)
awk 可以让您轻松分析日志文件或其他文件,这在您需要诊断问题时至关重要。有些人perl为此使用。您不需要了解有关这两种工具的所有信息,但您应该了解一些内容,以便您可以检查访问日志或 http 日志并确定是否发生了异常情况。
将 awk 与 sort、uniq、tail、grep 和 wc 相结合,让您的生活变得非常轻松。
混合一些 shell 脚本。能够做这样的事情非常方便
for i in server1.example.com server2.example.com server3.example.com ; do
xterm -e "ssh ${i} tail -f /var/log/message | grep something ";
done;
Run Code Online (Sandbox Code Playgroud)
这使您可以 grep 三个服务器上的日志something。像这样的技巧可以为您节省大量时间,这一切都归功于 shell 脚本工具。
| 归档时间: |
|
| 查看次数: |
12277 次 |
| 最近记录: |