1, Crontab
(1) crontab executed every 10 seconds
* * * * * */bin/date >>/tmp/date.txt
* * * * * * sleep 10; /bin/date >>/tmp/date.txt
(2) can also be expressed in the following ways
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
[Email protected]:~# W
10:15:27 up 1 day, 19:20, 2 users, load average:0.00, 0.01, 0.05
USER TTY from [email protected] IDLE jcpu PCPU
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
[Email protected]:~# pkill-kill-t pts/0
3. About several bin directories
/bin: Boot-related commands, including single-user mode for system repair such as CP MV Bash dmsg grep chmod
/sbin: Ditto, and generally allows root to be used such as Init iptables LVM
/usr/bin: Boot-independent command Java tail gcc
/usr/sbin: Ibid., General root command Useradd usermod
/usr/local/bin: When the same software requires a different version, but does not want to delete the original version, the new software is installed here
/user/local/sbin: Ibid., General root command
4. View 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
10. Basic Disk Partitioning steps
(1) Create partition fdisk
(2) format partition MKFS
(3) disk check fsck
(4) Mount mounted on disk
Some Linux little notes