摘要: [root@node2 ~]# cp /etc/passwd /server/scprits/ [root@node2 ~]# cd /server/scprits/ [root@node2 scprits]# ls -l passwd -rw-r--r--. 1 root root 1065 12 阅读全文
posted @ 2019-12-02 21:42 星火撩原 阅读(132) 评论(0) 推荐(0)
摘要: [root@node2 scprits]# cat > data << eof > This is the header line > This is the first data line > This is the secong data line > This is the last line 阅读全文
posted @ 2019-12-02 17:24 星火撩原 阅读(521) 评论(0) 推荐(0)
摘要: Sed 简介 sed 是一种新型的,非交互式的编辑器。它能执行与编辑器 vi 和 ex 相同的编辑任务。sed 编辑器没有提供交互式使用方式,使用者只能在命令行输入编辑命令、指定文件名,然后在屏幕上查看输出。 sed 编辑器没有破坏性,它不会修改文件,除非使用 shell 重定向来保存输出结果。默认 阅读全文
posted @ 2019-12-02 11:40 星火撩原 阅读(408) 评论(0) 推荐(0)
摘要: 第1章 练习题 第1题 取得/etc/hosts 文件的权限 如何取得/etc/hosts 文件的权限对应的数字内容,如-rw-r--r-- 为 644,要求使用命令取得644 这样的数字。 方法一 awk 指定分隔符 [root@node2 ~]# stat /etc/hosts |awk -F 阅读全文
posted @ 2019-12-02 10:52 星火撩原 阅读(316) 评论(0) 推荐(0)