[root@server ~]# ln /etc/NetworkManager/system-connections/ens160.nmconnection NIC1
[root@server ~]# stat /etc/NetworkManager/system-connections/ens160.nmconnection
[root@server ~]# stat NIC1
[root@server ~]# cd /home
[root@server home]# cd kxy
[root@server kxy]# mkdir -p ~/n1/n2/n3/n4
[root@server kxy]# mkdir -p ~/m1/m2/m3/m4
[root@server kxy]# stat ~/n1
[root@server kxy]# cp /etc/hosts ~/n1/n2/n3
[root@server kxy]# ls ~/n1/n2/n3
[root@server kxy]# cp -r ~/n1/ ~/m1/m2/m3/m4/
[root@server kxy]# rm -rf ~/n1/n2//n3/
[root@server ~]# mkdir /testproc
[root@server ~]# mkdir /testdev
[root@server ~]# touch /p1.txt
[root@server ~]# mv /testdev /testproc/
[root@server ~]# mv /p1.txt /testproc/testdev/
[root@server ~]# mv /testproc /test1
[root@server ~]# cd /test1/
[root@server test1]# tree
[root@server ~]# cd /home
[root@server home]# cd kxy
[root@server kxy]# mkdir dd
[root@server kxy]# cd dd
[root@server dd]# echo "Hello world!" > fox1.txt
[root@server dd]# cat fox1.txt
[root@server kxy]# ln dd/fox1.txt /backup/fox2.txt
[root@server dd]# stat fox1.txt
[root@server ~]# cd /mnt
[root@server mnt]# mkdir think
[root@server mnt]# cd
[root@server ~]# cp /etc/fstab /mnt/think/
[root@server ~]# cat /mnt/think/fstab
[root@server ~]# grep "xfs" /mnt/think/fstab
[root@server ~]# dd if=/dev/zero of=/datafile1 count=4 bs=512MB
[root@server ~]# dd if=/dev/zero of=/RHEL9.iso
[root@server ~]# rm -f /RHEL9.iso
[root@server ~]# rm -f /datafile1
[root@server ~]# rm -f /datafile2
[root@server ~]# tac /etc/NetworkManager/system-connections/ens160.nmconnection
[root@server ~]# echo /etc/NetworkManager/system-connections/ens160.nmconnection >> NIC2.txt
[root@server ~]# cat NIC2.txt
[root@server ~]# echo /etc/NetworkManager/system-connections/ens160.nmconnection >> NIC2.txt
[root@server ~]# cat NIC2.txt
[root@server ~]# ifconfig | grep -w inet | grep -w broadcast |cut -d " " -f10 >> ip1.txt
[root@server ~]# ifconfig | grep -w ether | cut -d " " -f 10 >> ip1.txt
[root@server ~]# cat /etc/NetworkManager/system-connections/ens160.nmconnection | grep -w "id" >> ip1.txt
[root@server ~]# cat ip1.txt
[root@server ~]# man cut >> cutman.txt
[root@server ~]# cat cutman.txt | head -10
[root@server ~]# cat cutman.txt | head -12 | tail -1
[root@server ~]# cat /etc/passwd
[root@server ~]# tac /etc/passwd
[root@server ~]# more /etc/passwd
[root@server ~]# less /etc/passwd
[root@server ~]# cat /etc/NetworkManager/system-connections/ens160.nmconnection | head -4 | tail -1 >> /root/NICETC.txt
[root@server ~]# cat /root/NICETC.txt
[root@server ~]# tail -5 /root/NICETC.txt | wc -w
[root@server ~]# stat /dev/cdrom >> /cdrometc.txt
[root@server ~]# stat /cdrometc.txt
[root@server ~]# cp /etc/passwd /var/
[root@server ~]# cat /var/passwd
[root@server ~]# find / -name "f*"
[root@server ~]# find / -name "?d*"
[root@server ~]# find / -name "*.conf"
[root@server ~]# find /root -name "*.sh"
[root@server ~]# find /etc -name "*d" -o -name "*b"
[root@server ~]# find /home -not -user "root"
[root@server ~]# find /tmp -mtime -7
[root@server ~]# find /etc -not -mtime -5
[root@server ~]# find /etc -type d -mtime -2
[root@server ~]# find / -type d
[root@server ~]# find / -size +200M
[root@server ~]# find / -size 30k
[root@server ~]# find /etc -perm 644
[root@server ~]# find / -empty -exec rm -rf {} \;
内容太多了有的就不加图了!!!
[root@server ~]# cat /etc/passwd | grep -w "bin"
[root@server ~]# cat /etc/passwd | grep -wn "root"
[root@server ~]# cat /etc/passwd | grep -wn "sbin"
[root@server ~]# cat /etc/passwd | grep -nB4 "nobody"
[root@server ~]# cat /etc/passwd | grep -nC3 "sshd"
[root@server ~]# cat /etc/passwd | grep "root" | wc -l
[root@server ~]# grep -v [^3-9] /etc/passwd
[root@server ~]# grep -n [0-9]$ /etc/sos/sos.conf
[root@server ~]# grep -v "^$" /etc/sos/sos.conf
第1列:城市位置编号。
第2列:月份。
第3列:存储代码及出库年份。
第4列:产品代号。
第5列:产品统一标价。
第6列:标识号。
第7列:合格数量。
file.txt文件内容:
48 Dec 3BC1977 LPSX 68.00 LVX2A 138
483 Sept 5AP1996 USP 65.00 LVX2C 189
47 Oct 3ZL1998 LPSX 43.00 KVM9D 512
219 dec 2CC1999 CAD 23.00 PLV2C 68
484 nov 7PL1996 CAD 49.00 PLV2C 234
483 may 5PA1998 USP 37.00 KVM9D 644
216 sept 3ZL1998 USP 86.00 KVM9E 234
[root@server ~]# vim file.txt
[root@server ~]# grep "48" file.txt | wc -l
[root@server ~]# grep -n "48" file.txt
[root@server ~]# grep -w "48" file.txt
[root@server ~]# cat file.txt | grep "48" | grep -v "Dec" | cut -d " " -f1
[root@server ~]# grep ^[^4] file.txt
[root@server ~]# grep "Sept" file.txt
[root@server ~]# cat file.txt | grep "K" | grep "D" | cut -d " " -f 19
[root@server ~]# mkdir tests1
[root@server ~]# cd tests1/
[root@server tests1]# touch t1.txt t2.txt
[root@server tests1]# ls
[root@server tests1]# echo "hello world" >> t3.txt
[root@server ~]# tar -cvf tests1.tar.gz tests1
[root@server ~]# mv tests1.tar.gz /
[root@server ~]# ls /
[root@server ~]#cd /etc
[root@server etc]# mkdir tests2
[root@server ~]#cd
[root@server ~]# cp /tests1.tar.gz /etc/tests2
[root@server ~]# cd /etc/tests2/
[root@server tests2]# cd /etc/tests2/
[root@server tests2]# tar -xvf /etc/tests2/tests1.tar.gz
[root@server tests2]# cat /etc/tests2/tests1/t3.txt
[root@server ~]# which pwd grep find more tar