11-15 rhel7 linux 学习课-4

  • cat 查看纯文本文件的内容

[root@ZZH ~]# ls

anaconda-ks.cfg Documents initial-setup-ks.cfg Pictures Templates zhou.txt

Desktop Downloads Music Public Videos

[root@ZZH ~]# cat anaconda-ks.cfg

#version=DEVEL

# System authorization information

auth --enableshadow --passalgo=sha512

repo --name="Server-HighAvailability" --baseurl=file:///run/install/repo/addons/HighAvailability

repo --name="Server-ResilientStorage" --baseurl=file:///run/install/repo/addons/ResilientStorage

# Use CDROM installation media

cdrom

# Use graphical install

graphical

# Run the Setup Agent on first boot

========

  • 查看文件前n行

[root@ZZH ~]# head -15 anaconda-ks.cfg

#version=DEVEL

# System authorization information

auth --enableshadow --passalgo=sha512

repo --name="Server-HighAvailability" --baseurl=file:///run/install/repo/addons/HighAvailability

repo --name="Server-ResilientStorage" --baseurl=file:///run/install/repo/addons/ResilientStorage

# Use CDROM installation media

cdrom

# Use graphical install

graphical

# Run the Setup Agent on first boot

firstboot --enable

ignoredisk --only-use=sda

# Keyboard layouts

keyboard --vckeymap=us --xlayouts='us'

# System language

  • tail

tail -15 anaconda-ks.cfg

@x11

chrony

kexec-tools

 

%end

 

%addon com_redhat_kdump --enable --reserve-mb='auto'

 

%end

 

%anaconda

pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty

pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok

pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty

%end

  • more查看大文件

root@ZZH ~]# more anaconda-ks.cfg

#version=DEVEL

# System authorization information

auth --enableshadow --passalgo=sha512

repo --name="Server-HighAvailability" --baseurl=file:///run/install/repo/addons/

HighAvailability

repo --name="Server-ResilientStorage" --baseurl=file:///run/install/repo/addons/

ResilientStorage

# Use CDROM installation media

cdrom

# Use graphical install

graphical

# Run the Setup Agent on first boot

firstboot --enable

ignoredisk --only-use=sda

# Keyboard layouts

keyboard --vckeymap=us --xlayouts='us'

# System language

lang en_US.UTF-8

 

# Network information

network --bootproto=dhcp --device=ens32 --onboot=off --ipv6=auto --no-activate

network --hostname=ZZH

 

--More--(38%)

==============

tail -f持续刷新

===========

  • wc统计字数行数字节数

[root@ZZH ~]# wc -l anaconda-ks.cfg

65 anaconda-ks.cfg

[root@ZZH ~]# wc -w anaconda-ks.cfg

149 anaconda-ks.cfg

[root@ZZH ~]# wc -c anaconda-ks.cfg

1702 anaconda-ks.cfg

============

tr替换、stat查看三种时间状态,cut提取列,diff比较文件差异(brief、c)

touch创建空白文件,设置a/m 时间

mkdir 创建空白目录

cp复制

mv剪切

rm删除

dd指定大小和块数复制

tar -czvf压缩

tar -xzvf解压缩

grep 按行提取,用于所搜关键字

find查找文件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值