随笔分类 -  LINUX/UNIX

上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页

passwd命令限制用户密码到期时间
摘要:1.passwd命令 2.chage -l命令 Showing Password Expiry Information with chage -l 如果时间小于(Minimum number of days between password change : 3),则不允许修改密码。 阅读全文

posted @ 2016-06-21 14:44 遠離塵世の方舟 阅读(2606) 评论(0) 推荐(0)

与useradd命令相关的两个默认配置文件
摘要:Configuration Files for User Management Defaults When working with tools as useradd, some default values are assumed. These default values are set in 阅读全文

posted @ 2016-06-17 14:51 遠離塵世の方舟 阅读(469) 评论(0) 推荐(0)

vipw和vigr命令
摘要:Modifying the Configuration Files To add user accounts, it suffices that one line is added to /etc/passwd and another line is added to /etc/shadow, in 阅读全文

posted @ 2016-06-17 11:00 遠離塵世の方舟 阅读(2325) 评论(0) 推荐(0)

linux sudo命令
摘要:sudo Instead of using the root user account, unprivileged users can be configured for using administrator permissions on specific tasks by using sudo. 阅读全文

posted @ 2016-06-16 16:27 遠離塵世の方舟 阅读(927) 评论(0) 推荐(0)

linux中切换用户方式su和su -的区别
摘要:Using su The su command allows users to open a terminal window, and from that terminal start a sub shell in which the user has another identity. To perform administrative tasks, for insta... 阅读全文

posted @ 2016-06-16 16:20 遠離塵世の方舟 阅读(544) 评论(0) 推荐(0)

ls Common Command-Line Options
摘要:ls Common Command-Line Options Command Use: ls -l Shows a long listing, which includes information about file properties, such as creation date and permissions. ls -a Shows all fil... 阅读全文

posted @ 2016-06-16 16:10 遠離塵世の方舟 阅读(251) 评论(0) 推荐(0)

Counting Lines, Words, and Characters with wc
摘要:Counting Lines, Words, and Characters with wc When working with text files, you sometimes get a large amount of output. Before deciding which approach 阅读全文

posted @ 2016-06-16 15:08 遠離塵世の方舟 阅读(303) 评论(0) 推荐(0)

Sorting File Contents and Output with sort
摘要:Sorting File Contents and Output with sort Another very useful command to use on text file is sort . As you can probably guess, this command sorts tex 阅读全文

posted @ 2016-06-16 11:14 遠離塵世の方舟 阅读(239) 评论(0) 推荐(0)

Filtering Specific Columns with cut
摘要:Filtering Specific Columns with cut When working with text files, it can be useful to filter out specific fields. Imagine that you need to see a list 阅读全文

posted @ 2016-06-16 10:51 遠離塵世の方舟 阅读(201) 评论(0) 推荐(0)

tail和head命令
摘要:[root@rhel7 ~]# cat rusky --cat命令查看文件内容 line1 line2 line3 line4 line5 line6 line7 line8 line9 line10 [root@rhel7 ~]# tail -n 3 rusky --查看最后3行内容 line8 line9 line10 [root@rhel7 ~]# tail -3 rusky ... 阅读全文

posted @ 2016-06-16 10:33 遠離塵世の方舟 阅读(1174) 评论(0) 推荐(0)

wildcard
摘要:[rusky@rhel7 test]$ lstest1 test123 test2 test317 test33 test335 test336 test44 testtest[rusky@rhel7 test]$ ls test?3test33[rusky@rhel7 test]$ ls test??3test123[rusky@rhel7 test]$ ls test... 阅读全文

posted @ 2016-06-15 16:04 遠離塵世の方舟 阅读(162) 评论(0) 推荐(0)

mount, findmnt,df命令
摘要:■ The mount command gives an overview of all mounted devices. To get this information, the /proc/mounts file is read, where the kernel keeps informati 阅读全文

posted @ 2016-06-15 15:27 遠離塵世の方舟 阅读(446) 评论(0) 推荐(0)

/etc/motd and /etc/issue
摘要:/etc/motd and /etc/issue Bash offers an option to include messages in the /etc/motd and the /etc/issue files. Messages in /etc/motd display after a us 阅读全文

posted @ 2016-06-15 11:21 遠離塵世の方舟 阅读(305) 评论(0) 推荐(0)

Environment Configuration Files
摘要:Environment Configuration Files When a user logs in, an environment is created for that user automatically. This happens based on four different files 阅读全文

posted @ 2016-06-15 10:41 遠離塵世の方舟 阅读(182) 评论(0) 推荐(0)

-bash: ulimit: open files: cannot modify limit: Operation not permitted
摘要:普通用户登录系统报错,提示: -bash: ulimit: open files: cannot modify limit: Operation not permitted. 处理方法: #vi /etc/ssh/sshd_config --使用root账号修改UseLoin 为yes UseLog 阅读全文

posted @ 2016-06-06 14:39 遠離塵世の方舟 阅读(11749) 评论(0) 推荐(0)

ulimit -n修改单进程可打开最大文件数目
摘要:对所有用户都生效: vi /etc/profile 添加一行如下: ulimit -n 65535 执行source /etc/profile生效,不需要重启服务器。 $ source /etc/profile$ ulimit -n65535 以后重启服务器后也生效。 如果不修改,默认值为1024, 阅读全文

posted @ 2016-05-10 15:11 遠離塵世の方舟 阅读(964) 评论(0) 推荐(0)

/dev/null 文件
摘要:/dev/null 文件 如果希望执行某个命令,但又不希望在屏幕上显示输出结果,那么可以将输出重定向到 /dev/null: /dev/null 是一个特殊的文件,写入到它的内容都会被丢弃;如果尝试从该文件读取内容,那么什么也读不到。但是 /dev/null 文件非常有用,将命令的输出重定向到它,会 阅读全文

posted @ 2016-04-22 17:21 遠離塵世の方舟 阅读(440) 评论(0) 推荐(0)

linux定时任务2-at命令
摘要:定时执行命令: 定时执行脚本: at命令的常见用法: at 2pm + 2 days /root/test.sh //2天后,下午2点执行test.sh脚本 at 10am + 2 weeks /root/test.sh //2个星期后,早上10点执行test.sh脚本 at 12am tomorr 阅读全文

posted @ 2016-04-12 22:46 遠離塵世の方舟 阅读(438) 评论(0) 推荐(0)

linux定时任务1-crontab命令
摘要:简单测试例子: 添加定时任务前,注意查看crond服务是否已经启动,如果未启动,则用命令service crond start命令启动。 注意给脚本添加可执行权限。 测试2: 多个数值用逗号隔开,如在每月1、3、4、12号的22:03执行定时任务 测试3: 连续时间可用“-”表示。如在每个小时10分 阅读全文

posted @ 2016-04-12 22:18 遠離塵世の方舟 阅读(406) 评论(0) 推荐(0)

linux配置时间同步
摘要:目标环境,5台linux centos 6.3, 一台作为NTPD服务与外部公共NTP服务同步时间,同时作为内网的NTPD服务器,其他机器与这台服务做时间同步。 1、负责与外部公共NTPD服务同步标准时间 2、作为内外网络的NTPD服务 NTPD服务平滑同步 1、NTP时间同步方式选择 NTP同步方 阅读全文

posted @ 2016-04-11 16:17 遠離塵世の方舟 阅读(730) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页

导航