首页 > 系统相关 >linux回炉第六天

linux回炉第六天

时间:2022-12-25 14:31:12浏览次数:41  
标签:10 tar 第六天 passwd 回炉 sed linux root find

~]# 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
~]# tar jcvf passwd.tar.bz2 passwd
~]# tar Jcvf passwd.tar.xz passwd
~]# tar xf passwd.tar.xz
~]# tar -tf passwd.tar.gz

标签:10,tar,第六天,passwd,回炉,sed,linux,root,find
From: https://blog.51cto.com/dayu/5968167

相关文章

  • linux 中 实现数据中指定的行的内容批量替换
     001、[root@PC1test4]#lsa.txtcoordinate.txt[root@PC1test4]#cata.txt##测试数据ddffsd1ssaaee2xxvvzz......
  • linux 中实现数据按照行进行展开
     001、[root@PC1test]#lscoordinate.txt[root@PC1test]#catcoordinate.txt##测试数据3MMM5GGG8QQQ[root@PC1......
  • linux下对qt编写的程序进行部署
    当我们完成程序设计之后,需要将可执行程序交付客户,而运行环境里面可能是没有相关支持库的,这个时候就涉及到部署的相关问题。对于我们在Linux下基于QT编写的图像处理程序,......
  • 在Linux下OpenCV的下载和编译
    完整从代码编译OpenCV在很多情况下是必须的。总体上来看,都是下载、编译、配置这三个过程,其中一些细节值得注意,记录如下。这里以ubuntu为例,其他发行版可能略有不同。1......
  • ffmpeg+libmp3lame库安装(linux)
    1.安装lame(libmp3fame的安装包)下载链接:https://sourceforge.net/projects/lame/files/lame/这里下载的文件版本为lame-3.100.tar.gz编译并安装tar-zxflame-3.100......
  • Linux进程信号
    写在前面下面我们来学习Linux中第三个模块,进程信号.今天我们将正式解释kill指令为何可以杀掉进程,这里存在很多小的知识点,信号在谈正式的内容之前,我们需要想一下我们之前......
  • linux网络编程-线程——通过信号控制互斥锁
    1//由于pthread库不是Linux系统默认的库,连接时需要使用库libpthread.a,所以在使用pthread_create创建线程时,在编译中要加-lpthread参数2//gccpthread_sig_mutex.c-......
  • linux 中实现批量讲指定的行替换为特定的数据
     001、sed实现[root@PC1test4]#lsa.txtcoordinate.txt[root@PC1test4]#cata.txt##测试数据ddffsd1ssaaee2xxvvzz3ssw......
  • Linux C语言程序设计(微课视频版)
     LinuxC语言程序设计(微课视频版) 主编:张同光 出版单位:清华大学出版社 ISBN: ISBN: 出版时间:2023.6 CIP: 内容简介本书以“学完C语言之后知道能做什么”为编写目标,共包括......
  • Linux网络基础
    网络就是把分布在不同地理位置上的主机,通过传输介质(网线、卫星等)连接起来,实现主机之间数据传输共享的目的。OSI7层网络模型传输过程数据从一个主机A发送到主机B时候,......