有機肥

          綠色

          2016年12月7日

          mysql 查看表的創建時間的語句

          select * from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'DBNAME' order by create_time desc;

          posted @ 2018-07-25 17:36 有機肥 閱讀(300) | 評論 (0)編輯 收藏

          進程

          ps -ef|grep java
          kill -9 1231

          posted @ 2018-07-17 11:09 有機肥 閱讀(148) | 評論 (0)編輯 收藏

          database-mysql

          導出數據庫

          直接使用命令:

          mysqldump -u root -p abc >abc.sql

          然后回車輸入密碼就可以了;

          mysqldump -u 數據庫鏈接用戶名 -p  目標數據庫 > 存儲的文件名

          文件會導出到當前目錄下

          導入數據庫(sql文件)

          mysql -u 用戶名 -p  數據庫名 < 數據庫名.sql
          mysql -u abc -p abc < abc.sql

          注意sql文件必須在當前目錄下,如果不在當前目錄下需要在< 之后加上具體sql文件路徑

          GBK: create database test2 DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci;

          UTF8: CREATE DATABASE `test2` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

          posted @ 2018-06-25 22:45 有機肥 閱讀(162) | 評論 (0)編輯 收藏

          mysql 存儲過程

          DELIMITER //
          CREATE PROCEDURE proc_tmp()
          BEGIN
          DECLARE done INT DEFAULT 0;  
          DECLARE product_Id VARCHAR(255);
          DECLARE yuanliao VARCHAR(255);
          DECLARE miaoshu VARCHAR(255);
          DECLARE shazhi VARCHAR(255);
          DECLARE midu VARCHAR(255);
          DECLARE mf VARCHAR(255);
          DECLARE zuzhi VARCHAR(255);
          DECLARE quality VARCHAR(255);
          DECLARE shuliang VARCHAR(255);
          DECLARE jiage VARCHAR(255);
          DECLARE price_date VARCHAR(255);

          DECLARE idCur CURSOR FOR SELECT productId,yl,ylms,sz,md,fk,zz,qa,amount,price,pricedate FROM sheet1;
          DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;

          OPEN idCur;  

          REPEAT
          FETCH idCur INTO product_Id,yuanliao,miaoshu,shazhi,midu,mf,zuzhi,quality,shuliang,jiage,price_date;
          IF NOT done THEN  
          INSERT INTO static_data(model_id,dataKey,dataVal,product_id) VALUES(3,'yl',yuanliao,product_Id);
          INSERT INTO static_data(model_id,dataKey,dataVal,product_id) VALUES(3,'ylms',miaoshu,product_Id);
          INSERT INTO static_data(model_id,dataKey,dataVal,product_id) VALUES(3,'sz',shazhi,product_Id);
          INSERT INTO static_data(model_id,dataKey,dataVal,product_id) VALUES(3,'md',midu,product_Id);
          INSERT INTO static_data(model_id,dataKey,dataVal,product_id) VALUES(3,'fk',mf,product_Id);
          INSERT INTO static_data(model_id,dataKey,dataVal,product_id) VALUES(3,'zz',zuzhi,product_Id);
          INSERT INTO static_data(model_id,dataKey,dataVal,product_id) VALUES(3,'qa',quality,product_Id);
          INSERT INTO static_data(model_id,dataKey,dataVal,product_id) VALUES(3,'amount',shuliang,product_Id);
          INSERT INTO static_data(model_id,dataKey,dataVal,product_id) VALUES(3,'price',jiage,product_Id);
          INSERT INTO static_data(model_id,dataKey,dataVal,product_id) VALUES(3,'pricedate',price_date,product_Id);
          END IF;
          UNTIL done END REPEAT;

          CLOSE idCur;
          END//
          DELIMITER ;

          CALL proc_tmp();
          DROP PROCEDURE proc_tmp;

          DELETE FROM sheet1;
          定義的變量不能和select里的同名

          posted @ 2018-06-08 11:04 有機肥 閱讀(164) | 評論 (0)編輯 收藏

          采摘2

               摘要: 小編整理的“宜興市主要鄉村旅游點瓜果采摘攻略”,希望能成為您瓜果采摘的好幫手!!!農家樂聯系人手機采摘項目籬笆園農家樂黃亞云13815118337草莓5月-11月挖筍 野菜 采茶 制烏米飯3-5月桑葚 4月油桃 5月 楊梅 6月下旬-7月中下旬 葡萄 7月-9月 挖百合 8月 板栗 9月底-10月份 綠緣生態農業有限公司陳慶元13701539886挖筍 挖野菜 3-4月 ...  閱讀全文

          posted @ 2017-10-30 16:47 有機肥 閱讀(139) | 評論 (0)編輯 收藏

          采摘1

          桑葚采

          好去處

          芳橋

          1、綠大地果桑種植基地 13063669929

          2、碧園春生態園 13771359607

          3、張慕果園 13812203223

          4、金沙灘蔬果園 13585035093

          建議采摘路線:市區→東氿大道→百合大道→芳塍路往北(詳見地圖指示)

          西渚

          ◆【1】甲有農林生態園

          地址:宜興市西渚鎮張戴公路白塔村部旁(近振元南路)

          ◆【2】白塔云芯林果專業合作社桑葚采摘園

          地址:白塔村委入口斜對面張戴公路邊

          ◆【3】小杭采摘園

          自駕線路: 宜興——橫山水庫

          ◆【4】白塔瓜果基地

          自駕線路:導航即到

          徐舍

          ◆ 蘇合農產品銷售專業合作聯社

          自駕線路:麥德龍——G104(行駛16.6公里)——徐舍鎮潘東村

          湖?

          ◆【1】籬笆園農家樂

          地址:宜興市湖?鎮洑西村

          ◆【2】金沙灣農莊

          地址:宜興市湖?鎮東興村

          posted @ 2017-10-30 16:45 有機肥 閱讀(137) | 評論 (0)編輯 收藏

          戶外燒烤必備的燒烤菜單

          【燒烤清單】

          1‘.燒烤工具:

          燒烤架、網架、木炭、燒烤叉、小毛刷、打火機、助燃劑、竹簽、牙簽、水果刀、報紙、
          一次性筷、一次性碗、一次性盤、一次性隔熱手套、紙杯、餐巾紙、濕巾紙、桌布、燒烤圍裙、垃圾袋燒烤夾(夾取生食)





          2.調料:

          調和油、鹽、醬油、燒烤醬(汁)、辣椒粉(老干媽)、孜然、五香粉、番茄醬、芝麻、胡蘿卜醬、甜面醬、海鮮調料、大蒜、姜、蔥花、蜂蜜、



          3、食品:
          葷菜:雞翅、排骨、香腸、火腿腸、牛肉、羊肉、五花肉、各式魚丸肉丸、雞珍、黃花魚、秋刀魚、鯽魚、魷魚、墨魚仔、蝦等



          素菜:玉米、韭菜、蘑菇、茄子、土豆、青椒、生菜(生菜包肉)、花菜、香干、臭干子、小鏝頭、年糕、面包片、棉花糖、皮蛋、胡蘿卜/黃瓜、藕片、等



          水果:香蕉、木瓜、蘋果、梨、菠蘿、哈密瓜等

           4、飲料:礦泉水、可樂(去油膩)、涼茶(降火)、橙汁、啤酒等


          posted @ 2017-10-27 17:08 有機肥 閱讀(126) | 評論 (0)編輯 收藏

          jquery xml

          $.ajax({
                      url:"${base}/bosImg.xml",
                      dataType:"xml",
                      success:function(data){
                          $(data).find("bosPicture[wlbh='"+wlbh+"'][size='800']").find("imgs").each(function (i){
                              $('#showbox').empty();
                              $(this).children('img').each(function (ii){
                                  $('#showbox').append('<img src="'+$(this).text()+'" width="280" height="280" />');
                              })
                          });
                      },
                      error:function(XMLHttpRequest, textStatus, errorThrown) {
                           alert(XMLHttpRequest.status);
                           alert(XMLHttpRequest.readyState);
                           alert(textStatus);
                      }

          posted @ 2017-10-04 01:06 有機肥 閱讀(125) | 評論 (0)編輯 收藏

          linux order

          grep -rn "2002675" ./catalina.out

          posted @ 2017-09-12 15:35 有機肥 閱讀(209) | 評論 (0)編輯 收藏

          在Freemarker中,如果要判斷序列中是否包含某個指定的元素

          在Freemarker中,如果要判斷序列中是否包含某個指定的元素,可以使用freemarker的內建函數seq_contains。

          注:seq_contains這個內建函數從FreeMarker 2.3.1 版本開始可用。而在2.3 版本中不存在

           

          使用示例:

          Freemarker代碼  收藏代碼
          1. <#--聲明一個序列,包含若干個元素-->  
          2. <#assign x = ["red", 16, "blue", "cyan"]>  
          3. <#--使用seq_contains判斷序列中的元素是否存在-->  
          4. "blue": ${x?seq_contains("blue")?string("yes", "no")}  
          5. "yellow": ${x?seq_contains("yellow")?string("yes", "no")}  
          6. 16: ${x?seq_contains(16)?string("yes", "no")}  
          7. "16": ${x?seq_contains("16")?string("yes", "no")}  

          輸出結果:

          Freemarker代碼  收藏代碼
          1. "blue": yes  
          2. "yellow": no  
          3. 16: yes  
          4. "16": no  

          附:seq_前綴在這個內建函數中是需要的,用來和contains 區分開。contains函數用來在字符串中查找子串(因為變量可以同時當作字符串和序列)。

          posted @ 2017-09-10 10:39 有機肥 閱讀(529) | 評論 (0)編輯 收藏

          dump

          Mysql導出表結構及表數據 mysqldump用法

              命令行下具體用法如下:  mysqldump -u用戶名 -p密碼 -d 數據庫名 表名 腳本名;

              1、導出數據庫為dbname的表結構(其中用戶名為root,密碼為dbpasswd,生成的腳本名為db.sql)
              mysqldump -uroot -pdbpasswd -d dbname >db.sql;

              2、導出數據庫為dbname某張表(test)結構
              mysqldump -uroot -pdbpasswd -d dbname test>db.sql;

              3、導出數據庫為dbname所有表結構及表數據(不加-d)
              mysqldump -uroot -pdbpasswd  dbname >db.sql;

              4、導出數據庫為dbname某張表(test)結構及表數據(不加-d)
              mysqldump -uroot -pdbpasswd dbname test>db.sql;

          D:\MyDrivers\software\mysql-5.6.26-winx64\bin>mysqldump -h192.168.2.4 -uroot -p -d dy cotton>ee.sql

          posted @ 2017-09-04 09:38 有機肥 閱讀(221) | 評論 (0)編輯 收藏

          solr常用命令

          查看幫助
          bin/solr -help     
                  可以看到solr有哪些子命令,如 start, stop, restart, status, healthcheck, create, create_core, create_collection, delete, version
          啟動start
          bin/solr start  -help    查看start幫助
          bin/solr start        啟動單機版
          bin/solr start -f           前臺啟動
          bin/solr start -p 8984        指定端口啟動
          bin/solr start -cloud        啟動分布式版本
          bin/solr start -e cloud -noprompt         -e表示要啟動一個現有的例子,例子名稱是cloud,cloud這個例子是以SolrCloud方式啟動的
          bin/solr restart          重啟項目

          create
          如果是單機版要創建core,如果是分布式的要創建collection
          bin/solr create -help     查看create幫助
          bin/solr create -c abc
                  abc是core或collection的名字,取決于solr是單機版還是cloud版本;刷新http://localhost:8983/solr ,可以看到core selector中多了一個abc
                  abc目錄的位置創建在solr.solr.home(默認是solr的server/solr目錄目錄下

          post提交數據生成索引
          bin/post -c abc docs/
                  向名為abccore或collection提交數據,數據源在docs/目錄中

          刪除
          bin/solr delete -c abc     刪除一個core或collection

          刪除索引
          bin/post -c abc  -d "<delete><id>/home/matthewi/software/solr-5.4.1/docs/solr-morphlines-core/allclasses-noframe.html</id></delete>"
          重新執行上面的搜索可以看到搜索結果的數量少了一條:numFound列

          bin/post -c abc -d "<delete><query>*:*</query></delete>"
          刪除所有數據

          停止solr
          bin/solr stop -all

          狀態
          bin/solr status

          posted @ 2017-08-08 17:28 有機肥 閱讀(138) | 評論 (0)編輯 收藏

          使用Nginx后如何在web應用中獲取用戶ip及原理解釋(轉)

               摘要: nginx.conf配置:location / { proxy_pass http://127.0.0.1:8080/myweb/;proxy_redirect off;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_ad...  閱讀全文

          posted @ 2017-08-02 14:41 有機肥 閱讀(119) | 評論 (0)編輯 收藏

          HttpClient4.4.1模擬登錄知乎(轉自http://blog.csdn.net/gaopu12345/article/details/45509387)

               摘要: 一,登錄要Post的表單數據是什么這部分可以使用Wireshark工具來抓包就可以了,發現需要以下數據:“_xsrf” = xxxx(這是一個變動的數據,需要先活取獲取知乎首頁源碼來獲得) “email” = 郵箱 “password” = 密碼 “rememberme” ...  閱讀全文

          posted @ 2017-07-10 17:50 有機肥| 編輯 收藏

          CloseableHttpResponse的使用

          public class ClientFormLogin {
           
              public static void main(String[] args) throws Exception {
                  BasicCookieStore cookieStore = new BasicCookieStore();
                  CloseableHttpClient httpclient = HttpClients.custom()
                          .setDefaultCookieStore(cookieStore)
                          .build();
                  try {
                      HttpGet httpget = new HttpGet("http://...");
                      CloseableHttpResponse response1 = httpclient.execute(httpget);
                      try {
                          HttpEntity entity = response1.getEntity();
           
                          System.out.println("Login form get: " + response1.getStatusLine());
           
                          System.out.println("Initial set of cookies:");
                          List<Cookie> cookies = cookieStore.getCookies();
                          if (cookies.isEmpty()) {
                              System.out.println("None");
                          } else {
                              for (int i = 0; i < cookies.size(); i++) {
                                  System.out.println("- " + cookies.get(i).toString());
                              }
                          }
                           
                          //輸出網頁源碼          
                          String result = EntityUtils.toString(response1.getEntity(), "utf-8"); 
                          System.out.println(result);                   
                              EntityUtils.consume(entity);
                              } finally {
                          response1.close();
                          }
                            }           
                         }

          posted @ 2017-07-10 17:39 有機肥 閱讀(2075) | 評論 (0)編輯 收藏

          HttpClient4.X的代理添加實現(轉自http://blog.csdn.net/hblfyla/article/details/54962898)

          package org.yla.test;

          import java.net.URI;
          import java.util.ArrayList;
          import java.util.List;

          import org.apache.commons.httpclient.HttpClient;
          import org.apache.commons.httpclient.methods.GetMethod;
          import org.apache.http.Header;
          import org.apache.http.HttpEntity;
          import org.apache.http.HttpHost;
          import org.apache.http.auth.AuthScope;
          import org.apache.http.auth.Credentials;
          import org.apache.http.auth.UsernamePasswordCredentials;
          import org.apache.http.client.CredentialsProvider;
          import org.apache.http.client.entity.UrlEncodedFormEntity;
          import org.apache.http.client.methods.CloseableHttpResponse;
          import org.apache.http.client.methods.HttpGet;
          import org.apache.http.client.methods.HttpPost;
          import org.apache.http.impl.client.BasicCredentialsProvider;
          import org.apache.http.impl.client.CloseableHttpClient;
          import org.apache.http.impl.client.HttpClientBuilder;
          import org.apache.http.impl.client.HttpClients;
          import org.apache.http.message.BasicNameValuePair;
          import org.apache.http.util.EntityUtils;
          import org.junit.Test;

          public class HttpClientTest {
              String url = "xxxxxxxxxxxxxxxxxxxxxxxxx";
              String ip = "202.107.233.85";
              int port = 8080;
              String username = "";
              String password = "";

              /**
               * 使用HttpClient4實現代理 202.107.233.85 8080
               *
               * @throws Exception
               */
              @Test
              public void test1() throws Exception {
                  HttpClientBuilder build = HttpClients.custom();
                  HttpHost proxy = new HttpHost(ip, port);
                  CloseableHttpClient client = build.setProxy(proxy).build();
                  HttpGet request = new HttpGet(url);
                  CloseableHttpResponse response = client.execute(request);
                  HttpEntity entity = response.getEntity();
                  System.out.println(EntityUtils.toString(entity));
              }

              /**
               * 使用httpclient3實現代理
               *
               * @throws Exception
               */
              @Test
              public void test2() throws Exception {
                  HttpClient httpClient = new HttpClient();
                  httpClient.getHostConfiguration().setProxy(ip, port);
                  GetMethod method = new GetMethod(url);
                  httpClient.executeMethod(method);
                  String result = new String(method.getResponseBody());
                  System.out.println(result);
              }

              /**
               * 使用httpclient4實現代理(帶密碼的代理)
               *
               * @throws Exception
               */
              @Test
              public void test3() throws Exception {
                  HttpClientBuilder build = HttpClients.custom();
                  CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
                  AuthScope authscope = new AuthScope(ip, port);
                  Credentials credentials = new UsernamePasswordCredentials(username,
                          password);
                  credentialsProvider.setCredentials(authscope, credentials);
                  CloseableHttpClient client = build.setDefaultCredentialsProvider(
                          credentialsProvider).build();
                  HttpGet request = new HttpGet(url);
                  CloseableHttpResponse response = client.execute(request);
                  HttpEntity entity = response.getEntity();
                  System.out.println(EntityUtils.toString(entity));
              }

              /**
               * 使用httpclient3實現代理(帶密碼的代理)
               *
               * @throws Exception
               */
              @Test
              public void test4() throws Exception {
                  HttpClient httpClient = new HttpClient();
                  org.apache.commons.httpclient.auth.AuthScope authscope = new org.apache.commons.httpclient.auth.AuthScope(
                          ip, port);
                  org.apache.commons.httpclient.Credentials credentials = new org.apache.commons.httpclient.UsernamePasswordCredentials(
                          username, password);
                  httpClient.getState().setProxyCredentials(authscope, credentials);
                  GetMethod method = new GetMethod(url);
                  httpClient.executeMethod(method);
                  String result = new String(method.getResponseBody());
                  System.out.println(result);
              }

              /**
               * 模擬登錄官網(http://mis.pyc.com.cn??
               *
               * @throws Exception
               */
              @Test
              public void testLogin() throws Exception {
                  HttpClientBuilder build = HttpClients.custom();
                  CloseableHttpClient client = build.build();
                  HttpPost post = new HttpPost("http://mis.pyc.com.cn/login.aspx");
                  List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>();
                  params.add(new BasicNameValuePair("__VIEWSTATE",
                          "/wEPDwUJNjUwNzE0MTM4ZGQzh+vF2xGjdG8Q15kIqgR0CpxhmPucdCqZOPcglRZr/w=="));
                  params.add(new BasicNameValuePair(
                          "__EVENTVALIDATION",
                          "/wEWBQLYtKSdCALEhISFCwKd+7qdDgKC3IeGDAK7q7GGCOqhJpRD8S8yy3ZAlPTSsmPzRUoXMK0mQvGgzlk6hm+G"));
                  params.add(new BasicNameValuePair("txtName", "xxxxx"));
                  params.add(new BasicNameValuePair("txtPwd", "xxxxxx"));
                  params.add(new BasicNameValuePair("btnLogin", "xxxx"));
                  HttpEntity entity = new UrlEncodedFormEntity(params, "UTF-8");
                  post.setEntity(entity);
                  CloseableHttpResponse response = client.execute(post);
                  int statusCode = response.getStatusLine().getStatusCode();
                  System.err.println("狀態" + statusCode);
                  if (statusCode == 302) {
                      Header[] location = response.getHeaders("location");
                      String rediretUrl = null;
                      if (location.length == 1) {
                          rediretUrl = "http://mis.pyc.com.cn" + location[0].getValue();
                          System.err.println("跳轉地址: " + rediretUrl);
                      }
                      Header[] allHeaders = response.getAllHeaders();
                      System.out.println("==================response===================");
                      for (Header header : allHeaders) {
                          System.err.println(header.getName() + ": " + header.getValue());
                      }
                      Header cookieHeader = response.getFirstHeader("Set-Cookie");
                      String cookie = cookieHeader.getValue();
                      System.out.println("cookie: " + cookie);
                      HttpGet httpGet = new HttpGet(rediretUrl);
                      httpGet.addHeader("Accept",
                              "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
                      // httpGet.addHeader("Accept-Encoding", "gzip, deflate, sdch");
                      // httpGet.addHeader("Accept-Language", "zh-CN,zh;q=0.8");
                      httpGet.addHeader("Connection", "keep-alive");
                      httpGet.addHeader("Cookie", cookie);
                      httpGet.addHeader("Host", "mis.pyc.com.cn");
                      httpGet.addHeader("Referer", "http://mis.pyc.com.cn/login.aspx");
                      httpGet.addHeader(
                              "User-Agent",
                              "ozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36");
                      response = client.execute(httpGet);
                      HttpEntity entity2 = response.getEntity();
                      System.out
                              .println("----------------------------------------------");
                      System.out.println(EntityUtils.toString(entity2));
                  }
              }
          }

          posted @ 2017-07-10 17:27 有機肥| 編輯 收藏

          centos7 mysql數據庫安裝和配置(轉http://www.cnblogs.com/starof/p/4680083.html)

          一、系統環境

          yum update升級以后的系統版本為

          [root@yl-web yl]# cat /etc/redhat-release  CentOS Linux release 7.1.1503 (Core) 

          二、mysql安裝

          # wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm # rpm -ivh mysql-community-release-el7-5.noarch.rpm # yum install mysql-community-server

          安裝成功后重啟mysql服務。

          # service mysqld restart

          初次安裝mysql,root賬戶沒有密碼。

          復制代碼
          [root@yl-web yl]# mysql -u root  Welcome to the MySQL monitor.  Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.6.26 MySQL Community Server (GPL)  Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.  Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.  mysql> show databases; +--------------------+ | Database           | +--------------------+ | information_schema | | mysql              | | performance_schema | | test               | +--------------------+ 4 rows in set (0.01 sec)  mysql> 
          復制代碼

          設置密碼

          mysql> set password for 'root'@'localhost' =password('password'); Query OK, 0 rows affected (0.00 sec)  mysql> 

          不需要重啟數據庫即可生效。

          三、配置mysql

          1、編碼

          mysql配置文件為/etc/my.cnf

          最后加上編碼配置

          [mysql] default-character-set =utf8

          這里的字符編碼必須和/usr/share/mysql/charsets/Index.xml中一致。

          2、遠程連接設置

          把在所有數據庫的所有表的所有權限賦值給位于所有IP地址的root用戶。

          mysql> grant all privileges on *.* to root@'%'identified by 'password';

          如果是新用戶而不是root,則要先新建用戶

          mysql>create user 'username'@'%' identified by 'password';  

          此時就可以進行遠程連接了。

          posted @ 2017-03-01 10:20 有機肥 閱讀(164) | 評論 (0)編輯 收藏

          linux zip

          linux zip命令

          zip -r myfile.zip ./*
          將當前目錄下的所有文件和文件夾全部壓縮成myfile.zip文件,-r表示遞歸壓縮子目錄下所有文件.

          2.unzip
          unzip -o -d /home/sunny myfile.zip
          把myfile.zip文件解壓到 /home/sunny/
          -o:不提示的情況下覆蓋文件;
          -d:-d /home/sunny 指明將文件解壓縮到/home/sunny目錄下;

          3.其他
          zip -d myfile.zip smart.txt
          刪除壓縮文件中smart.txt文件
          zip -m myfile.zip ./rpm_info.txt
          向壓縮文件中myfile.zip中添加rpm_info.txt文件
          -------------------------------------------------------------------------------

          要使用 zip 來壓縮文件,在 shell 提示下鍵入下面的命令:

          zip -r filename.zip filesdir
           

          在這個例子里,filename.zip 代表你創建的文件,filesdir 代表你想放置新 zip 文件的目錄。-r 選項指定你想遞歸地(recursively)包括所有包括在 filesdir 目錄中的文件。

          要抽取 zip 文件的內容,鍵入以下命令:

          unzip filename.zip
           

          你可以使用 zip 命令同時處理多個文件和目錄,方法是將它們逐一列出,并用空格間隔:

          zip -r filename.zip file1 file2 file3 /usr/work/school
           

          上面的命令把 file1、file2、 file3、以及 /usr/work/school 目錄的內容(假設這個目錄存在)壓縮起來,然后放入 filename.zip 文件中。

          posted @ 2016-12-07 14:39 有機肥 閱讀(116) | 評論 (0)編輯 收藏

          <2016年12月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          導航

          統計

          常用鏈接

          留言簿

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 庄浪县| 望江县| 洱源县| 汕头市| 东阳市| 通化县| 双峰县| 皮山县| 平潭县| 永川市| 巩留县| 泾川县| 皋兰县| 札达县| 温泉县| 阿坝县| 蓬溪县| 双江| 错那县| 昌邑市| 磐安县| 合作市| 玉山县| 潞城市| 布拖县| 温州市| 乌什县| 建瓯市| 博客| 五大连池市| 济源市| 青河县| 蒙城县| 华阴市| 黄大仙区| 大田县| 缙云县| 铜鼓县| 三门县| 海宁市| 河曲县|