如何在Linux Shell中将文件的创建日期和上次修改日期更改为当前时间?

时间:2016-10-09 16:59:49

标签: linux bash shell

我在bash中寻找一个命令来将最后修改和创建的时间戳更改为当前时间。 如何使用shell命令/脚本执行此操作?

谢谢!

1 个答案:

答案 0 :(得分:2)

import cv2 import numpy as np surf = cv2.xfeatures2d.SURF_create(400) # Read Images train = cv2.imread('box.png',0) test = cv2.imread('box_in_scene.png',0) # Find Descriptors kp1,trainDes1 = surf.detectAndCompute(train, None) kp2,testDes2 = surf.detectAndCompute(test, None) # Create BFMatcher and add cluster of training images. One for now. bf = cv2.BFMatcher(cv2.NORM_L1,crossCheck=False) # crossCheck not supported by BFMatcher clusters = np.array([trainDes1]) bf.add(clusters) # Train: Does nothing for BruteForceMatcher though. bf.train() matches = bf.match(testDes2) matches = sorted(matches, key = lambda x:x.distance) # Since, we have index of only one training image, # all matches will have imgIdx set to 0. for i in range(len(matches)): print matches[i].imgIdx 将更新访问和修改时间(或分别只有touch-a的两个中的一个)。