next up previous contents
Next: QtEmbedded porting Up: strip 工具 Previous: strip-symbol   Contents

preserve-dates

  1. 查看修整過的檔案與原始檔案存取/修改時間,已經不同。
    [dywang@dyH gcc]$ stat stripex1 stripex1_stripped 
      File: `stripex1'
      Size: 8195      	Blocks: 24         IO Block: 4096   regular file
    Device: fd03h/64771d	Inode: 18142       Links: 1
    Access: (0775/-rwxrwxr-x)  Uid: (  500/  dywang)   Gid: (  500/  dywang)
    Access: 2013-09-01 09:19:35.495806134 +0800
    Modify: 2013-09-01 09:18:57.410054071 +0800
    Change: 2013-09-01 09:18:57.410054071 +0800
      File: `stripex1_stripped'
      Size: 4368      	Blocks: 16         IO Block: 4096   regular file
    Device: fd03h/64771d	Inode: 18144       Links: 1
    Access: (0775/-rwxrwxr-x)  Uid: (  500/  dywang)   Gid: (  500/  dywang)
    Access: 2013-09-01 09:19:35.495806134 +0800
    Modify: 2013-09-01 09:19:35.495806134 +0800
    Change: 2013-09-01 09:19:35.495806134 +0800
    
  2. 修整時維持原始檔的存取/修改時間
    [dywang@dyH gcc]$ strip -p -ostripex1_strippedp stripex1
    
  3. 再查看修整過的檔案 stripex1_strippedp 與原始檔案 stripex1 存取/修改時間,i完全一樣。
    [dywang@dyH gcc]$ stat stripex1 stripex1_stripped 
      File: `stripex1'
    [dywang@dyH gcc]$ stat stripex1 stripex1_stripped stripex1_strippedp
      File: `stripex1'
      Size: 8195      	Blocks: 24         IO Block: 4096   regular file
    Device: fd03h/64771d	Inode: 18142       Links: 1
    Access: (0775/-rwxrwxr-x)  Uid: (  500/  dywang)   Gid: (  500/  dywang)
    Access: 2013-09-01 09:19:35.495806134 +0800
    Modify: 2013-09-01 09:18:57.410054071 +0800
    Change: 2013-09-01 09:18:57.410054071 +0800
      File: `stripex1_stripped'
      Size: 4368      	Blocks: 16         IO Block: 4096   regular file
    Device: fd03h/64771d	Inode: 18144       Links: 1
    Access: (0775/-rwxrwxr-x)  Uid: (  500/  dywang)   Gid: (  500/  dywang)
    Access: 2013-09-01 09:19:35.495806134 +0800
    Modify: 2013-09-01 09:19:35.495806134 +0800
    Change: 2013-09-01 09:19:35.495806134 +0800
      File: `stripex1_strippedp'
      Size: 4368      	Blocks: 16         IO Block: 4096   regular file
    Device: fd03h/64771d	Inode: 18141       Links: 1
    Access: (0775/-rwxrwxr-x)  Uid: (  500/  dywang)   Gid: (  500/  dywang)
    Access: 2013-09-01 09:19:35.000000000 +0800
    Modify: 2013-09-01 09:18:57.000000000 +0800
    Change: 2013-09-01 09:34:19.322931661 +0800
    


2015-01-16