Check the created time of a file [on hold]
up vote
0
down vote
favorite
I could view a file's created date
on GUI desktop as
However, I can only refer to the last modified date
from the command line
$ ls -l
total 12
-rw-r--r-- 1 root admin 6235 Sep 26 08:51 FlexLexer.h
-rw-r--r-- 1 root admin 4651 Nov 10 15:05 apue.h
drwxr-xr-x 3 root admin 96 Aug 23 05:04 c++
-rw-r--r-- 1 root admin 2282 Nov 10 15:06 error.c
drwxr-xr-x 3 root admin 96 Aug 14 16:52 swift
How can I check the created date from bash?
bash macos
put on hold as off-topic by melpomene, Socowi, Joakim Danielson, Welcome to Stack Overflow, Matthew L Daniel 2 days ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – melpomene, Socowi, Joakim Danielson, Welcome to Stack Overflow, Matthew L Daniel
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
up vote
0
down vote
favorite
I could view a file's created date
on GUI desktop as
However, I can only refer to the last modified date
from the command line
$ ls -l
total 12
-rw-r--r-- 1 root admin 6235 Sep 26 08:51 FlexLexer.h
-rw-r--r-- 1 root admin 4651 Nov 10 15:05 apue.h
drwxr-xr-x 3 root admin 96 Aug 23 05:04 c++
-rw-r--r-- 1 root admin 2282 Nov 10 15:06 error.c
drwxr-xr-x 3 root admin 96 Aug 14 16:52 swift
How can I check the created date from bash?
bash macos
put on hold as off-topic by melpomene, Socowi, Joakim Danielson, Welcome to Stack Overflow, Matthew L Daniel 2 days ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – melpomene, Socowi, Joakim Danielson, Welcome to Stack Overflow, Matthew L Daniel
If this question can be reworded to fit the rules in the help center, please edit the question.
4
This one here unix.stackexchange.com/q/20460
– u__
Nov 10 at 12:07
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I could view a file's created date
on GUI desktop as
However, I can only refer to the last modified date
from the command line
$ ls -l
total 12
-rw-r--r-- 1 root admin 6235 Sep 26 08:51 FlexLexer.h
-rw-r--r-- 1 root admin 4651 Nov 10 15:05 apue.h
drwxr-xr-x 3 root admin 96 Aug 23 05:04 c++
-rw-r--r-- 1 root admin 2282 Nov 10 15:06 error.c
drwxr-xr-x 3 root admin 96 Aug 14 16:52 swift
How can I check the created date from bash?
bash macos
I could view a file's created date
on GUI desktop as
However, I can only refer to the last modified date
from the command line
$ ls -l
total 12
-rw-r--r-- 1 root admin 6235 Sep 26 08:51 FlexLexer.h
-rw-r--r-- 1 root admin 4651 Nov 10 15:05 apue.h
drwxr-xr-x 3 root admin 96 Aug 23 05:04 c++
-rw-r--r-- 1 root admin 2282 Nov 10 15:06 error.c
drwxr-xr-x 3 root admin 96 Aug 14 16:52 swift
How can I check the created date from bash?
bash macos
bash macos
edited Nov 10 at 12:03
melpomene
55.6k54387
55.6k54387
asked Nov 10 at 11:59
Sawajiri
2019
2019
put on hold as off-topic by melpomene, Socowi, Joakim Danielson, Welcome to Stack Overflow, Matthew L Daniel 2 days ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – melpomene, Socowi, Joakim Danielson, Welcome to Stack Overflow, Matthew L Daniel
If this question can be reworded to fit the rules in the help center, please edit the question.
put on hold as off-topic by melpomene, Socowi, Joakim Danielson, Welcome to Stack Overflow, Matthew L Daniel 2 days ago
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – melpomene, Socowi, Joakim Danielson, Welcome to Stack Overflow, Matthew L Daniel
If this question can be reworded to fit the rules in the help center, please edit the question.
4
This one here unix.stackexchange.com/q/20460
– u__
Nov 10 at 12:07
add a comment |
4
This one here unix.stackexchange.com/q/20460
– u__
Nov 10 at 12:07
4
4
This one here unix.stackexchange.com/q/20460
– u__
Nov 10 at 12:07
This one here unix.stackexchange.com/q/20460
– u__
Nov 10 at 12:07
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
As you are on macOS, you can use mdls
like this:
mdls z.png
Sample Output
_kMDItemRenderData = <09000000 00f1c1c0 41000501 02>
kMDItemBitsPerSample = 8
kMDItemColorSpace = "RGB"
kMDItemContentCreationDate = 2018-09-19 06:19:19 +0000
kMDItemContentCreationDate_Ranking = 2018-09-19 00:00:00 +0000
kMDItemContentModificationDate = 2018-11-08 10:11:07 +0000
kMDItemContentType = "public.png"
kMDItemContentTypeTree = (
"public.png",
"public.item",
"public.png",
"public.data",
"public.image",
"public.content"
)
kMDItemDateAdded = 2018-09-20 08:14:02 +0000
kMDItemDateAdded_Ranking = 2018-09-20 00:00:00 +0000
kMDItemDisplayName = "z.png"
kMDItemFSContentChangeDate = 2018-11-08 10:11:07 +0000
kMDItemFSCreationDate = 2018-09-19 06:19:19 +0000
kMDItemFSCreatorCode = ""
kMDItemFSFinderFlags = 0
kMDItemFSHasCustomIcon = (null)
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery = (null)
kMDItemFSLabel = 0
kMDItemFSName = "z.png"
kMDItemFSNodeCount = (null)
kMDItemFSOwnerGroupID = 20
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 353
kMDItemFSTypeCode = ""
kMDItemHasAlphaChannel = 0
kMDItemInterestingDate_Ranking = 2018-11-08 00:00:00 +0000
kMDItemKind = "PNG image"
kMDItemLastUsedDate = 2018-11-08 10:10:41 +0000
kMDItemLastUsedDate_Ranking = 2018-11-08 00:00:00 +0000
kMDItemLogicalSize = 353
kMDItemOrientation = 0
kMDItemPhysicalSize = 4096
kMDItemPixelCount = 160000
kMDItemPixelHeight = 400
kMDItemPixelWidth = 400
kMDItemProfileName = "sRGB IEC61966-2.1"
kMDItemUseCount = 78
kMDItemUsedDates = (
"2018-09-18 23:00:00 +0000",
"2018-10-19 23:00:00 +0000",
"2018-10-20 23:00:00 +0000",
"2018-10-24 23:00:00 +0000",
"2018-10-26 23:00:00 +0000",
"2018-11-03 00:00:00 +0000",
"2018-11-08 00:00:00 +0000"
)
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
As you are on macOS, you can use mdls
like this:
mdls z.png
Sample Output
_kMDItemRenderData = <09000000 00f1c1c0 41000501 02>
kMDItemBitsPerSample = 8
kMDItemColorSpace = "RGB"
kMDItemContentCreationDate = 2018-09-19 06:19:19 +0000
kMDItemContentCreationDate_Ranking = 2018-09-19 00:00:00 +0000
kMDItemContentModificationDate = 2018-11-08 10:11:07 +0000
kMDItemContentType = "public.png"
kMDItemContentTypeTree = (
"public.png",
"public.item",
"public.png",
"public.data",
"public.image",
"public.content"
)
kMDItemDateAdded = 2018-09-20 08:14:02 +0000
kMDItemDateAdded_Ranking = 2018-09-20 00:00:00 +0000
kMDItemDisplayName = "z.png"
kMDItemFSContentChangeDate = 2018-11-08 10:11:07 +0000
kMDItemFSCreationDate = 2018-09-19 06:19:19 +0000
kMDItemFSCreatorCode = ""
kMDItemFSFinderFlags = 0
kMDItemFSHasCustomIcon = (null)
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery = (null)
kMDItemFSLabel = 0
kMDItemFSName = "z.png"
kMDItemFSNodeCount = (null)
kMDItemFSOwnerGroupID = 20
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 353
kMDItemFSTypeCode = ""
kMDItemHasAlphaChannel = 0
kMDItemInterestingDate_Ranking = 2018-11-08 00:00:00 +0000
kMDItemKind = "PNG image"
kMDItemLastUsedDate = 2018-11-08 10:10:41 +0000
kMDItemLastUsedDate_Ranking = 2018-11-08 00:00:00 +0000
kMDItemLogicalSize = 353
kMDItemOrientation = 0
kMDItemPhysicalSize = 4096
kMDItemPixelCount = 160000
kMDItemPixelHeight = 400
kMDItemPixelWidth = 400
kMDItemProfileName = "sRGB IEC61966-2.1"
kMDItemUseCount = 78
kMDItemUsedDates = (
"2018-09-18 23:00:00 +0000",
"2018-10-19 23:00:00 +0000",
"2018-10-20 23:00:00 +0000",
"2018-10-24 23:00:00 +0000",
"2018-10-26 23:00:00 +0000",
"2018-11-03 00:00:00 +0000",
"2018-11-08 00:00:00 +0000"
)
add a comment |
up vote
0
down vote
As you are on macOS, you can use mdls
like this:
mdls z.png
Sample Output
_kMDItemRenderData = <09000000 00f1c1c0 41000501 02>
kMDItemBitsPerSample = 8
kMDItemColorSpace = "RGB"
kMDItemContentCreationDate = 2018-09-19 06:19:19 +0000
kMDItemContentCreationDate_Ranking = 2018-09-19 00:00:00 +0000
kMDItemContentModificationDate = 2018-11-08 10:11:07 +0000
kMDItemContentType = "public.png"
kMDItemContentTypeTree = (
"public.png",
"public.item",
"public.png",
"public.data",
"public.image",
"public.content"
)
kMDItemDateAdded = 2018-09-20 08:14:02 +0000
kMDItemDateAdded_Ranking = 2018-09-20 00:00:00 +0000
kMDItemDisplayName = "z.png"
kMDItemFSContentChangeDate = 2018-11-08 10:11:07 +0000
kMDItemFSCreationDate = 2018-09-19 06:19:19 +0000
kMDItemFSCreatorCode = ""
kMDItemFSFinderFlags = 0
kMDItemFSHasCustomIcon = (null)
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery = (null)
kMDItemFSLabel = 0
kMDItemFSName = "z.png"
kMDItemFSNodeCount = (null)
kMDItemFSOwnerGroupID = 20
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 353
kMDItemFSTypeCode = ""
kMDItemHasAlphaChannel = 0
kMDItemInterestingDate_Ranking = 2018-11-08 00:00:00 +0000
kMDItemKind = "PNG image"
kMDItemLastUsedDate = 2018-11-08 10:10:41 +0000
kMDItemLastUsedDate_Ranking = 2018-11-08 00:00:00 +0000
kMDItemLogicalSize = 353
kMDItemOrientation = 0
kMDItemPhysicalSize = 4096
kMDItemPixelCount = 160000
kMDItemPixelHeight = 400
kMDItemPixelWidth = 400
kMDItemProfileName = "sRGB IEC61966-2.1"
kMDItemUseCount = 78
kMDItemUsedDates = (
"2018-09-18 23:00:00 +0000",
"2018-10-19 23:00:00 +0000",
"2018-10-20 23:00:00 +0000",
"2018-10-24 23:00:00 +0000",
"2018-10-26 23:00:00 +0000",
"2018-11-03 00:00:00 +0000",
"2018-11-08 00:00:00 +0000"
)
add a comment |
up vote
0
down vote
up vote
0
down vote
As you are on macOS, you can use mdls
like this:
mdls z.png
Sample Output
_kMDItemRenderData = <09000000 00f1c1c0 41000501 02>
kMDItemBitsPerSample = 8
kMDItemColorSpace = "RGB"
kMDItemContentCreationDate = 2018-09-19 06:19:19 +0000
kMDItemContentCreationDate_Ranking = 2018-09-19 00:00:00 +0000
kMDItemContentModificationDate = 2018-11-08 10:11:07 +0000
kMDItemContentType = "public.png"
kMDItemContentTypeTree = (
"public.png",
"public.item",
"public.png",
"public.data",
"public.image",
"public.content"
)
kMDItemDateAdded = 2018-09-20 08:14:02 +0000
kMDItemDateAdded_Ranking = 2018-09-20 00:00:00 +0000
kMDItemDisplayName = "z.png"
kMDItemFSContentChangeDate = 2018-11-08 10:11:07 +0000
kMDItemFSCreationDate = 2018-09-19 06:19:19 +0000
kMDItemFSCreatorCode = ""
kMDItemFSFinderFlags = 0
kMDItemFSHasCustomIcon = (null)
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery = (null)
kMDItemFSLabel = 0
kMDItemFSName = "z.png"
kMDItemFSNodeCount = (null)
kMDItemFSOwnerGroupID = 20
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 353
kMDItemFSTypeCode = ""
kMDItemHasAlphaChannel = 0
kMDItemInterestingDate_Ranking = 2018-11-08 00:00:00 +0000
kMDItemKind = "PNG image"
kMDItemLastUsedDate = 2018-11-08 10:10:41 +0000
kMDItemLastUsedDate_Ranking = 2018-11-08 00:00:00 +0000
kMDItemLogicalSize = 353
kMDItemOrientation = 0
kMDItemPhysicalSize = 4096
kMDItemPixelCount = 160000
kMDItemPixelHeight = 400
kMDItemPixelWidth = 400
kMDItemProfileName = "sRGB IEC61966-2.1"
kMDItemUseCount = 78
kMDItemUsedDates = (
"2018-09-18 23:00:00 +0000",
"2018-10-19 23:00:00 +0000",
"2018-10-20 23:00:00 +0000",
"2018-10-24 23:00:00 +0000",
"2018-10-26 23:00:00 +0000",
"2018-11-03 00:00:00 +0000",
"2018-11-08 00:00:00 +0000"
)
As you are on macOS, you can use mdls
like this:
mdls z.png
Sample Output
_kMDItemRenderData = <09000000 00f1c1c0 41000501 02>
kMDItemBitsPerSample = 8
kMDItemColorSpace = "RGB"
kMDItemContentCreationDate = 2018-09-19 06:19:19 +0000
kMDItemContentCreationDate_Ranking = 2018-09-19 00:00:00 +0000
kMDItemContentModificationDate = 2018-11-08 10:11:07 +0000
kMDItemContentType = "public.png"
kMDItemContentTypeTree = (
"public.png",
"public.item",
"public.png",
"public.data",
"public.image",
"public.content"
)
kMDItemDateAdded = 2018-09-20 08:14:02 +0000
kMDItemDateAdded_Ranking = 2018-09-20 00:00:00 +0000
kMDItemDisplayName = "z.png"
kMDItemFSContentChangeDate = 2018-11-08 10:11:07 +0000
kMDItemFSCreationDate = 2018-09-19 06:19:19 +0000
kMDItemFSCreatorCode = ""
kMDItemFSFinderFlags = 0
kMDItemFSHasCustomIcon = (null)
kMDItemFSInvisible = 0
kMDItemFSIsExtensionHidden = 0
kMDItemFSIsStationery = (null)
kMDItemFSLabel = 0
kMDItemFSName = "z.png"
kMDItemFSNodeCount = (null)
kMDItemFSOwnerGroupID = 20
kMDItemFSOwnerUserID = 501
kMDItemFSSize = 353
kMDItemFSTypeCode = ""
kMDItemHasAlphaChannel = 0
kMDItemInterestingDate_Ranking = 2018-11-08 00:00:00 +0000
kMDItemKind = "PNG image"
kMDItemLastUsedDate = 2018-11-08 10:10:41 +0000
kMDItemLastUsedDate_Ranking = 2018-11-08 00:00:00 +0000
kMDItemLogicalSize = 353
kMDItemOrientation = 0
kMDItemPhysicalSize = 4096
kMDItemPixelCount = 160000
kMDItemPixelHeight = 400
kMDItemPixelWidth = 400
kMDItemProfileName = "sRGB IEC61966-2.1"
kMDItemUseCount = 78
kMDItemUsedDates = (
"2018-09-18 23:00:00 +0000",
"2018-10-19 23:00:00 +0000",
"2018-10-20 23:00:00 +0000",
"2018-10-24 23:00:00 +0000",
"2018-10-26 23:00:00 +0000",
"2018-11-03 00:00:00 +0000",
"2018-11-08 00:00:00 +0000"
)
answered Nov 10 at 18:03
Mark Setchell
83.4k567165
83.4k567165
add a comment |
add a comment |
4
This one here unix.stackexchange.com/q/20460
– u__
Nov 10 at 12:07