Archiving and compression of Linux:
1. Space saving
2. Facilitate the management of fragmented documents
Tar Integrated Backup tool:
-C: Create an archive
-X: Release Archive
-F: Specify the Archive file name
-Z,-j,-j: Call the GZ, bz2, XZ format tools for processing
-C: Specify the release location
-P: Maintain absolute path to files within archive
-TAR-ZCF backup files. tar.gz files that are backed up
-TAR-JCF backup files. tar.bz2 files that are backed up
-TAR-JCF backup files. tar.xz files that are backed up
Example: TAR-ZCF/OPT/FILE.TAR.GZ/BOOT/ETC/PASSWD
Tar-xf/opt/file.tar.gz-c/mnt
Tar-tf/opt/file.tar.gz see what's in the package
Tar-pjcf/root/backup.tar.bz2/usr/local
Use the Bzip2 compression method to package and compress in absolute path mode.
Cron Scheduled Tasks
System Services: Crond
Log file:/var/log/crond
Use the crontab command:
-Edit: CRONTAB-E-u user name
-View: crontab-l-u user name
-Clear: Crontab-r-u user name
1. View server Status: Systemctl status Crond
2. Writing Planning tasks: * * * * * (Time-sharing week)
Which: the location of the program that corresponds to the query command
Example: Useradd Lisi
CRONTAB-E-U Lisi
*/1 * * * */usr/bin/data >>/home/lisi/abc.txt
(*/1 means no minutes)
Wach-n |cat/home/lisi/abc.txt View
Linux archiving and compression and Linux cron time scheduling tasks