Summary of Linux knowledge points and Linux knowledge points
1. crontab (1) crontab is executed every 10 seconds
* * * * * /bin/date >>/tmp/date.txt * * * * * sleep 10; /bin/date >>/tmp/date.txt
(2) You can also use the following methods to express
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. Kick the user offline
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. Several bin directories/bin: commands related to boot, including system repairs in single-user mode, such as cp mv bash dmsg grep chmod/sbin: Same as above, generally, root is allowed to use commands such as init iptables lvm/usr/bin: commands unrelated to startup: java tail gcc/usr/sbin: Same as above, generally, the root command useradd usermod/usr/local/bin: when the same software requires a different version but does not want to delete the original version, install the new software here/user/local/sbin: Same as above, general commands used by root 4. view the memory and cpu information in the proc file system cat/proc/cpuinfo cat/proc/meminfo 5. Some Common commands and options
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. basic steps of disk partitioning (1) create a partition fdisk (2) format the partition mkfs (3) Check the disk and fsck (4) mount the disk
7. apt Common commands (1) install apt-get install scala (2) specify a certain version of apt-get install calla = 2.9.2 (3) delete a software apt-get remove scala (4) search for a software apt-cache search scala