~]# sed -rn 's/root/ROOT/p' passwd
~]# sed -rn 's/root/ROOT/gp' passwd
~]# sed -rn '1,2p' passwd
~]# sed -rn '1,5s/root/ROOT/gp' passwd
~]# sed -rn '1,+3s/root/ROOT/p' passwd
~]# sed -rn '1,$s/root/ROOT/p' passwd
~]# seq 10 |sed -rn '1~2p'
~]# sed -in '1s/root/ROOT/' passwd
~]# sed -i '1s/ROOT/root/' passwd
~]# sed -n 's/root/ROOT/Ip' passwd
~]# sed -rn '/Root/Ip' passwd
]# sed '2a what' passwd
~]# sed '2i what' passwd
~]# sed '2d' passwd
~]# seq 10 | sed '2~2d'
~]# seq 10 | sed '2d;3d'
~]# seq 10 | sed -e '2d' -e '3d'
~]# sed '/^#/d;/^$/d' functions
~]# sed -n '/^#/!p' fstab
~]# sed -r -i.bak '/^GRUB_CMDLINE_LINUX/s/(.*)(")$/\1 net.ifnames=0 \2/' grub
~]# sed -r -i.bak '/^GRUB_CMDLINE_LINUX/s/"$/ net.ifnames=0"/' grub
locate passwd
updatedb
~]# locate -r "\<pass\>"
~]# locate -i pass
~]# find /etc -name passwd
~]# find -samefile passwd
]# find ! \( -type l -o -type f \)
~]# find -type l -o -type f
~]# find ! -user wang -o ! -user eryou
~]# find ! -user wang -a ! -user eryou
~]# find /tmp -not \( -user root -o -name 'f*' \) -ls
~]# find -size +100M
~]# find / -size +1M -size -10M -ls
~]# find -atime -1
~]# find -amin -60
~]# find -perm 770
~]# find -perm -740
~]# find -perm /755
~]# find /etc -regex ".*wd"
~]# find /etc -regextype posix-extended -regex ".*wd"
~]# find -perm /111 ! -name "*.sh" -exec chmod o-x {} \;
~]# seq 10 | xargs
~]# seq 10 | xargs -n1
~]# seq 10 | xargs -n2
~]# echo user{1..10} | xargs -n1 useradd
~]# echo user{1..10} | xargs -n1 userdel -r
gzip
gzip -d
gzip -k
gzip -c
gunzip
gzip -6
zcat
bzip2
bunzip2
bzcat
xz
unxz
zip
unzip
zip -P 123 passwd.zip passwd
~]# tar zcvf passwd.tar.gz passwd标签:10,tar,第六天,passwd,回炉,sed,linux,root,find From: https://blog.51cto.com/dayu/5968167
~]# tar jcvf passwd.tar.bz2 passwd
~]# tar Jcvf passwd.tar.xz passwd
~]# tar xf passwd.tar.xz
~]# tar -tf passwd.tar.gz