BOOTCAMP Change Last Opened Date.
MacBook Pro, OS X El Capitan (10.11)
MacBook Pro, OS X El Capitan (10.11)
Is it causing a problem? The "last opened date" is not a file system attribute, but metadata. Finder would have to write that metadata, or you can do it with xattr. I doubt that booting Windows would set that metadata attribute.
No, booting won't change a thing.
I tried using xattr using command:
xattr -d com.apple.quarantine /Volumes/BOOTCAMPBut this wont change a thing.
What command should I use?
đ
Thanks!đ
stormxeron wrote:
No, booting won't change a thing.
I tried using xattr using command:
xattr -d com.apple.quarantine /Volumes/BOOTCAMP
But this wont change a thing.
What command should I use?
Not sure why setting the Quarantine attribute seemed relevant. You would need to change the last opened date attribute (kMDItemLastUsedDate), but I'm not sure what purpose that would serve.
None of the commands below works:
xattr -d com.apple.metadata:kMDItemWhereFroms /Volumes/BOOTCAMP
xattr -d kMDItemLastUsedDate /Volumes/BOOTCAMPThis would not serve any purpose just for curiosityđ
If those are the correct metadata attributes, Both of those commands would delete those attributes, leaving the null value of the Epoch displayed.
if those commands can't change then I can't change it right??
RE:@Barney-15E
AND also:
kMDItemLastUsedDate has following info:
The information stored in kMDItemLastUsedDate is obviously not true because even though the date is same, the time is not the same (i.e 5:30 am) in every other metadata attributes as i posted earlier. So my conclusion is that the information about last opened date is stored somewhere but I cannot find it.
The -d deletes the attributes. It doesn't change them. You would need to use the write syntax to change the value.
I don't know what the OS does if it finds those missing. It could recreate them. Run mdls and see if they were deleted after running the delete commands.
If Get Info and the metadata do not match, then I would assume those entries are not related, or Finder is just ignoring them or can't read them (null might be displayed as 0),
Well I found this:
The value of attributes changed by command xattr is independent of the values displayed by the mdls
When I did this in a text file:
mdls -name kMDItemLastUsedDate /Users/StormXeron/Desktop/commands\ copy.txt
the stored date in kMDItemLastUsedDate was displayed as:
Then I use xattr write function as suggested by you as
xattr -w com.apple.metadata:kMDItemLastUsedDate "2016-01-01 12:34:56 +0000" /Users/StormXeron/Desktop/commands\ copy.txt
xattr -w kMDItemLastUsedDate "2016-01-01 12:34:56 +0000" /Users/StormXeron/Desktop/commands\ copy.txt
Now here I found a difference:
I. With mdls results:(Unchanged output)
Input:
mdls -name kMDItemLastUsedDate /Users/StormXeron/Desktop/commands\ copy.txt
Output:
2. With xattr -l the results were
Input:
xattr -l /Users/StormXeron/Desktop/commands\ copy.txt
Output:
Conclusion:
1.The attributes displayed by 'mdls' command is unchangable because the source of the values taken by those attributes are different so I cannot find it.
2. Interestingly, the xattr -w creates new attribute and then sets its value.
3. I can't find the command to change the attributes displayed by mdls. (this is what I need)đ
BOOTCAMP Change Last Opened Date.