亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
查看: 2556 | 回復(fù): 7
打印 上一主題 下一主題

[系統(tǒng)管理] 請(qǐng)教unzip更新timestamp [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2014-06-10 11:15 |只看該作者 |倒序?yàn)g覽
請(qǐng)教各位大俠:請(qǐng)問(wèn)unzip想解壓的時(shí)候更新文件修改時(shí)間為當(dāng)前時(shí)間,應(yīng)該帶什么參數(shù)?

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2014-06-10 11:44 |只看該作者
本帖最后由 todayhero 于 2014-06-10 11:55 編輯

@karlzheng_cu



沒(méi)發(fā)現(xiàn)有這個(gè)參數(shù),可以使用touch命令實(shí)現(xiàn)。


  1. touch URFILE
復(fù)制代碼

論壇徽章:
33
榮譽(yù)會(huì)員
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT運(yùn)維版塊每日發(fā)帖之星
日期:2016-04-17 06:23:27操作系統(tǒng)版塊每日發(fā)帖之星
日期:2016-04-18 06:20:00IT運(yùn)維版塊每日發(fā)帖之星
日期:2016-04-24 06:20:0015-16賽季CBA聯(lián)賽之天津
日期:2016-05-06 12:46:59
3 [報(bào)告]
發(fā)表于 2014-06-10 13:17 |只看該作者
回復(fù) 1# karlzheng_cu
希望對(duì)你有幫助. 我沒(méi)試過(guò).
  1.        -D     skip  restoration  of timestamps for extracted items.  Normally,
  2.               unzip tries to restore all meta-information for extracted  items
  3.               that  are supplied in the Zip archive (and do not require privi-
  4.               leges or impose a security risk).  By specifying  -D,  unzip  is
  5.               told  to  suppress  restoration  of  timestamps  for directories
  6.               explicitly created from Zip archive entries.  This  option  only
  7.               applies to ports that support setting timestamps for directories
  8.               (currently ATheOS, BeOS, MacOS,  OS/2,  Unix,  VMS,  Win32,  for
  9.               other unzip ports, -D has no effect).  The duplicated option -DD
  10.               forces suppression of timestamp restoration  for  all  extracted
  11.               entries (files and directories).  This option results in setting
  12.               the timestamps for all extracted entries to the current time.

  13.               On VMS, the default setting for this option is  -D  for  consis-
  14.               tency   with  the  behaviour  of  BACKUP:  file  timestamps  are
  15.               restored, timestamps of extracted directories are  left  at  the
  16.               current  time.   To  enable restoration of directory timestamps,
  17.               the negated option --D should be specified.  On VMS, the  option
  18.               -D  disables timestamp restoration for all extracted Zip archive
  19.               items.  (Here, a single -D on the command line combines with the
  20.               default -D to do what an explicit -DD does on other systems.)
復(fù)制代碼

論壇徽章:
0
4 [報(bào)告]
發(fā)表于 2014-06-10 15:19 |只看該作者
todayhero 發(fā)表于 2014-06-10 11:44
@karlzheng_cu


很多文件的

論壇徽章:
0
5 [報(bào)告]
發(fā)表于 2014-06-10 15:19 |只看該作者
q1208c 發(fā)表于 2014-06-10 13:17
回復(fù) 1# karlzheng_cu
希望對(duì)你有幫助. 我沒(méi)試過(guò).


試了 不行

論壇徽章:
0
6 [報(bào)告]
發(fā)表于 2014-06-10 15:22 |只看該作者
@karlzheng_cu

很多文件,你就
  1. find ./ | xargs touch
復(fù)制代碼

論壇徽章:
33
榮譽(yù)會(huì)員
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT運(yùn)維版塊每日發(fā)帖之星
日期:2016-04-17 06:23:27操作系統(tǒng)版塊每日發(fā)帖之星
日期:2016-04-18 06:20:00IT運(yùn)維版塊每日發(fā)帖之星
日期:2016-04-24 06:20:0015-16賽季CBA聯(lián)賽之天津
日期:2016-05-06 12:46:59
7 [報(bào)告]
發(fā)表于 2014-06-10 15:24 |只看該作者
回復(fù) 5# karlzheng_cu
剛才試了一下, "-DD" 是可以的. 不知道樓主是如何試的呢?

我前面發(fā)的man中提到過(guò) -DD 的用法.
  1. [q1208c@host 15:21 /tmp/q1208c.BQgb6]
  2. $ ll
  3. total 32
  4. -rw-rw-r-- 1 q1208c q1208c   0 Jun  6 17:29 a[1-4]b.txt
  5. -rw-rw-r-- 1 q1208c q1208c   0 Jun  6 17:29 a1b.txt
  6. -rw-rw-r-- 1 q1208c q1208c   0 Jun  6 17:29 a2b.txt
  7. -rw-rw-r-- 1 q1208c q1208c   0 Jun  6 17:29 a3b.txt
  8. -rw-rw-r-- 1 q1208c q1208c   0 Jun  6 17:29 a4b.txt
  9. -rw-rw-r-- 1 q1208c q1208c 258 Jun  6 12:38 file1
  10. -rw-rw-r-- 1 q1208c q1208c 847 Jun  7 11:22 file2
  11. -rw-rw-r-- 1 q1208c q1208c 148 Jun  9 16:41 file3
  12. -rw-rw-r-- 1 q1208c q1208c  76 Jun  9 17:25 file4
  13. -rw-rw-r-- 1 q1208c q1208c  84 Jun  9 17:25 file5
  14. -rw-rw-r-- 1 q1208c q1208c 980 Jun 10 09:25 test.beam
  15. -rw-rw-r-- 1 q1208c q1208c 521 Jun 10 09:26 test.erl
  16. -rw-rw-r-- 1 q1208c q1208c 537 Jun 10 08:14 test.erl.org

  17. [q1208c@wangzw 15:21 /tmp/q1208c.BQgb6]
  18. $ zip file1.zip file1
  19.   adding: file1 (deflated 62%)

  20. [q1208c@wangzw 15:22 /tmp/q1208c.BQgb6]
  21. $ mkdir temp

  22. [q1208c@wangzw 15:22 /tmp/q1208c.BQgb6]
  23. $ cd temp

  24. [q1208c@wangzw 15:22 /tmp/q1208c.BQgb6/temp]
  25. $ unzip -DD ../file1.zip
  26. Archive:  ../file1.zip
  27.   inflating: file1                  

  28. [q1208c@wangzw 15:22 /tmp/q1208c.BQgb6/temp]
  29. $ ll
  30. total 4
  31. -rw-rw-r-- 1 q1208c q1208c 258 Jun 10 15:22 file1

  32. [q1208c@wangzw 15:22 /tmp/q1208c.BQgb6/temp]
  33. $ rm -rf file1

  34. [q1208c@wangzw 15:22 /tmp/q1208c.BQgb6/temp]
  35. $ unzip -D ../file1.zip
  36. Archive:  ../file1.zip
  37.   inflating: file1                  

  38. [q1208c@wangzw 15:22 /tmp/q1208c.BQgb6/temp]
  39. $ ll
  40. total 4
  41. -rw-rw-r-- 1 q1208c q1208c 258 Jun  6 12:38 file1

  42. [q1208c@wangzw 15:22 /tmp/q1208c.BQgb6/temp]
  43. $
復(fù)制代碼

論壇徽章:
0
8 [報(bào)告]
發(fā)表于 2014-06-10 19:35 |只看該作者
q1208c 發(fā)表于 2014-06-10 15:24
回復(fù) 5# karlzheng_cu
剛才試了一下, "-DD" 是可以的. 不知道樓主是如何試的呢?


以為是 “-D” 參數(shù)就行了

謝謝!
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP