首页 技术 正文
技术 2022年11月8日
0 收藏 483 点赞 1,900 浏览 1451 个字

 

 1、crontab  (1)crontab每10秒执行一次 

* * * * * /bin/date >>/tmp/date.txt * * * * * sleep 10; /bin/date >>/tmp/date.txt 

(2)还可以用以下方式表达 

string            meaning  
——           ——-  
@reboot        Run once, at startup.  
@yearly         Run once a year,  ” 0 0 1 1 * “.  
@annually      (same as  @yearly)  
@monthly       Run once a month,  ” 0 0 1 * * “.  
@weekly        Run once a week,  ” 0 0 * * 0 “.  
@daily           Run once a day,  ” 0 0 * * * “.  
@midnight      (same as  @daily)  
@hourly         Run once an hour,  ” 0 * * * * 

  2、踢用户下线  

root@iZ94hgp4s2xZ:~# w  10:15:27 up 1 day, 19:20,  2 users,  load average: 0.00, 0.01, 0.05 USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT jediael  pts/0    218.107.55.252   09:15   31.00s  0.13s  0.13s -bash root     pts/1    218.107.55.252   10:15    1.00s  0.02s  0.00s w root@iZ94hgp4s2xZ:~# pkill -kill -t pts/0 

 3、关于几个bin目录 /bin:与开机相关的命令,包括单用户模式时用于系统的修复  如 cp mv bash dmsg grep chmod /sbin:同上,且一般是允许root使用 如 init iptables lvm /usr/bin:与开机无关的命令  java tail gcc  /usr/sbin:同上,一般root使用的命令 useradd usermod /usr/local/bin:当同一软件需要不同版本,但又不想删除原有版本时,就将新软件安装在这里 /user/local/sbin:同上,一般root使用的命令  4、在proc文件系统中查看内存及cpu信息 cat /proc/cpuinfo cat /proc/meminfo   5、一些常用命令及选项 

cat /etc/passwd | cut -d ‘:’ -f 1 apt-cache dumpavail | grep  ‘Package: mysql’ cat /etc/passwd | sort -t ‘:’ -k 3 -n last | cut -d ‘ ‘ -f 1 | sort | uniq -c 

 6、磁盘分区基本步骤(1)创建分区 fdisk(2)格式化分区 mkfs(3)磁盘检查 fsck(4)磁盘挂载 mount7、关于apt常用命令(1)安装apt-get install scala(2)指定某个版本apt-get install calla=2.9.2(3)删除某个软件apt-get remove scala(4)查找某个软件apt-cache search scala

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,489
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,904
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,737
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,490
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:8,128
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:5,291