Skip to Content

tar简单应用

  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /var/www/drupal_module/views/handlers/views_handler_filter.inc on line 0.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /var/www/drupal_module/views/handlers/views_handler_filter.inc on line 0.
  • strict warning: Declaration of views_handler_filter_node_status::operator_form() should be compatible with views_handler_filter::operator_form(&$form, &$form_state) in /var/www/drupal_module/views/modules/node/views_handler_filter_node_status.inc on line 0.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /var/www/drupal_module/views/plugins/views_plugin_row.inc on line 0.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /var/www/drupal_module/views/plugins/views_plugin_row.inc on line 0.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/drupal_module/views/views.module on line 906.
  • strict warning: Declaration of views_handler_field_comment::init() should be compatible with views_handler_field::init(&$view, $options) in /var/www/drupal_module/views/modules/comment/views_handler_field_comment.inc on line 0.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /var/www/drupal_module/views/handlers/views_handler_filter_boolean_operator.inc on line 0.

经常不记得tar的用法,现记录如下:

命令格式:

tar  选项  文件目录列表

功能:  

对文件目录进行打包备份

选项:

-c  建立新的归档文件

-r  向归档文件末尾追加文件

-x  从归档文件中解出文件

-O  将文件解开到标准输出

-v  处理过程中输出相关信息

-f  对普通文件操作

-z  调用gzip来压缩归档文件,与-x联用时调用gzip完成解压缩

-Z  调用compress来压缩归档文件,与-x联用时调用compress完成解压缩  

例如:

1.将当前目录下所有.txt文件打包并压缩归档到文件this.tar.gz,我们可以使用

tar czvf this.tar.gz ./*.txt

2.将当前目录下的this.tar.gz中的文件解压到当前目录我们可以使用

tar xzvf this.tar.gz ./

-- EOF-TRUEVUE --