码迷,mamicode.com
首页 >  
搜索关键字:etc/passwd    ( 1656个结果
Linux 常用命令
查看用户组cat /etc/group 查看用户列表cat /etc/passwd设置目录export PATH=/mnt/c/Develop/mongodb:$PATH删除文件夹实例:rm -rf /var/log/httpd/access将会删除/var/log/httpd/access目录以及... ...
分类:系统相关   时间:2017-12-15 12:33:21    阅读次数:167
第十一章习题答案
第十一章练习题答案 1. 如何把 /etc/passwd 中用户uid 大于500 的行给打印出来 awk -f ':' '$3 > 500' /etc/passwd 2. awk中 nr,nf两个变量表示什么含义awk -f ':' '{print $nr}' /etc/passwd 会打印出什么
分类:其他好文   时间:2017-12-11 18:56:36    阅读次数:173
mycp.c
#include #include #include #include #include #include #define BUFSIZE 1024 /* ./mycp /etc/passwd /home/passwd diff /etc/passwd /home/passwd */ void co... ...
分类:其他好文   时间:2017-11-29 16:09:21    阅读次数:788
用户和用户组管理
  配置文件和格式/etc/passwd:login name:passwd:UID:GID:注释(finger  username 查看注释):用户家目录:shell/etc/group:群组名:群组密码(记录在gshadow):GID:以当前组为附加组的用户列表:(分隔符为逗号)/etc/shadow: login name:passwd:last  c
分类:其他好文   时间:2017-11-26 19:31:28    阅读次数:187
linux笔记(28)sed和awk的联系及拓展
sed练习题把/etc/passwd复制到/root/test.txt,用sed打印所有行[root@localhostsed]#sed-n‘1,$p‘passwd打印test.txt的3到10行[root@localhostsed]#sed-n‘3,10‘ppasswd打印test.txt中包含‘root’的行[root@localhostsed]#sed-n‘/root/‘ppasswd删除t
分类:系统相关   时间:2017-11-25 19:23:39    阅读次数:212
Linux Shell编程 - 字符截取命令
01、字段提取命令 cut => cut [选项] 文件名 -f 列号: 提取第几列 -d 分隔符:按照指定分割符分割列 例如:cut -f 2,4(列号;,逗号可以多行提取) student.txt cut -d “:” -f 1,3 /etc/passwd 02、格式化输出命令 printf 命 ...
分类:系统相关   时间:2017-11-25 17:31:42    阅读次数:189
其他文本处理命令以及bash变量中的一些字符串的处理方法
其他的文本处理命令:1.wc2.cut命令:  cut - 在文件的每一行中提取片断   注意:能够被cut修剪的文件或数据内容,一般是具有某种特定格式或结构的文本文件或数据内容;  如 :/etc/passwd  格式:cut [OPTION]... [FILE]...  常用选项:   -d, --delimite
分类:其他好文   时间:2017-11-24 17:04:30    阅读次数:188
shell学习-批量删除用户
需求:使用for循环批量删除用户[root@mapeng-edu~]#cat/etc/passwd root:x:0:0:root:/root:/bin/bash .. stu01:x:1001:1001::/home/stu01:/bin/bash stu02:x:1002:1002::/home/stu02:/bin/bash stu03:x:1003:1003::/home/stu03:/bin/bash stu04:x:1004:1004::/home/stu04:/bin/..
分类:系统相关   时间:2017-11-22 20:17:05    阅读次数:164
linux-practice(23-24)
23、grep/egrep正则表达式练习:1)显示/etc/passwd文件中不以bash结尾的行;答:#grep-v"bash$"/etc/passwd2)找出ifconfig命令执行结果中的两位或三位整数;答:#ifconfig|grep--color=auto"\<\([[:digit:]]\{2,3\}\)\>"//还有00#ifconfig|grep--color=auto"\<\([1-9]..
分类:系统相关   时间:2017-11-21 14:51:51    阅读次数:190
sudo
sudo命令详解sudo命令是Linux上的一个非常有用的工具,它允许系统管理员分配给普通用户一些合理的“权利”,让他们执行一些只有超级用户或其他特许用户才能完成的任务,比如:运行一些像mount,userdel,useradd之类的命令,或者编辑一些系统配置文件,像/etc/passwd,/etc/sam..
分类:其他好文   时间:2017-11-21 10:50:52    阅读次数:111
1656条   上一页 1 ... 58 59 60 61 62 ... 166 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!