tar -zcf ksc-monitor-web.tar.gz build ./build
时间: 2023-08-09 08:07:28 浏览: 59
您好!根据您的命令 "tar -zcf ksc-monitor-web.tar.gz build ./build",这个命令将会创建一个名为 "ksc-monitor-web.tar.gz" 的压缩归档文件,并将目录 "build" 下的内容以及当前目录下的 "build" 文件打包进去。
具体来说,选项的含义如下:
- `-z`:使用 gzip 压缩算法压缩归档文件。
- `-c`:创建新的归档文件。
- `-f`:指定归档文件的名称。
命令中的参数如下:
- "ksc-monitor-web.tar.gz":归档文件的名称。
- "build":要打包的目录,即将 "build" 目录下的内容打包进归档文件。
- "./build":当前目录下的 "build" 文件。
综上所述,该命令将会创建一个名为 "ksc-monitor-web.tar.gz" 的压缩归档文件,并将目录 "build" 下的内容以及当前目录下的 "build" 文件打包进去。
如果您还有其他问题,请随时提问!
相关问题
tar -zcf mysql-lib-$date.tar. gz dbinfo.txt /var/lib/mysql &> /dev/null
这个命令将会创建一个名为"mysql-lib-$date.tar.gz"的压缩文件,其中包括"dbinfo.txt"文件和"/var/lib/mysql"目录。该压缩文件使用tar命令进行打包,并通过gzip进行压缩。最后,将输出重定向到/dev/null,这意味着不会显示任何输出信息。
完整的命令如下所示:
```shell
tar -zcf mysql-lib-$date.tar.gz dbinfo.txt /var/lib/mysql &> /dev/null
```
这个命令会在当前目录下创建一个压缩文件,并将"dbinfo.txt"文件和"/var/lib/mysql"目录添加到压缩文件中。然后,通过gzip进行压缩,并将输出重定向到/dev/null,以便隐藏任何输出信息。
GNU nano 2.9.3 /tmp/crontab.afdNF3/crontab # Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system # daemon's notion of time and timezones. # # Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command 0 12 * * * /home/sjt/work/date/0605/log.sh为哈就是一直卡在这里
看起来你正在编辑一个 crontab 文件,这个文件中包含了定时任务的配置信息。你想要添加一个定时任务,让 `/home/sjt/work/date/0605/log.sh` 脚本每天中午 12 点执行一次。
根据 crontab 文件的格式,你可以在文件中添加以下一行来实现:
```
0 12 * * * /home/sjt/work/date/0605/log.sh
```
这行中的五个时间字段 `0 12 * * *` 分别表示分钟、小时、月中的天、月份、周中的天。`*` 表示任意值,因此这行的含义就是每天中午 12 点执行一次 `/home/sjt/work/date/0605/log.sh` 脚本。
完成修改后,保存并退出 crontab 文件即可。