What does newermt mean in find command?
I know I can use this option to find file between particular modified times. But I'm curious about what does this mean?
I used man find | grep newermt
trying to find something. But I got no direct content. It seems -newer file
and mtime
stuff may have relation with it. But I'm not sure..
So, what does -newermt
actually mean?
command-line find
add a comment |
I know I can use this option to find file between particular modified times. But I'm curious about what does this mean?
I used man find | grep newermt
trying to find something. But I got no direct content. It seems -newer file
and mtime
stuff may have relation with it. But I'm not sure..
So, what does -newermt
actually mean?
command-line find
add a comment |
I know I can use this option to find file between particular modified times. But I'm curious about what does this mean?
I used man find | grep newermt
trying to find something. But I got no direct content. It seems -newer file
and mtime
stuff may have relation with it. But I'm not sure..
So, what does -newermt
actually mean?
command-line find
I know I can use this option to find file between particular modified times. But I'm curious about what does this mean?
I used man find | grep newermt
trying to find something. But I got no direct content. It seems -newer file
and mtime
stuff may have relation with it. But I'm not sure..
So, what does -newermt
actually mean?
command-line find
command-line find
edited Nov 25 '14 at 12:31
slm♦
250k66526683
250k66526683
asked Nov 25 '14 at 4:40
ZenZen
2,272103054
2,272103054
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
find(1)
:
-newerXY reference
Compares the timestamp of the current file with reference. The
reference argument is normally the name of a file (and one of
its timestamps is used for the comparison) but it may also be a
string describing an absolute time. X and Y are placeholders
for other letters, and these letters select which time belonging
to how reference is used for the comparison.
a The access time of the file reference
B The birth time of the file reference
c The inode status change time of reference
m The modification time of the file reference
t reference is interpreted directly as a time
add a comment |
find ./ -mtime +n
used to get all files older than n
daysfind ./ -mtime -n
used to get all files modified in last n
days
Now if you are using 1
in place of n
, you will get files modified in the last 24 hours. But what if you want only files from yesterday and not within the last 24 hours? Here newermt
comes into the picture.
find ./ -newermt "2016-01-18" ! -newermt '2016-01-19'
will give you all files which are newer than specified date and !
will exclude all files which are newer than the specified date. So the above command will give a list of files which were modified on 2016-01-18.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f169798%2fwhat-does-newermt-mean-in-find-command%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
find(1)
:
-newerXY reference
Compares the timestamp of the current file with reference. The
reference argument is normally the name of a file (and one of
its timestamps is used for the comparison) but it may also be a
string describing an absolute time. X and Y are placeholders
for other letters, and these letters select which time belonging
to how reference is used for the comparison.
a The access time of the file reference
B The birth time of the file reference
c The inode status change time of reference
m The modification time of the file reference
t reference is interpreted directly as a time
add a comment |
find(1)
:
-newerXY reference
Compares the timestamp of the current file with reference. The
reference argument is normally the name of a file (and one of
its timestamps is used for the comparison) but it may also be a
string describing an absolute time. X and Y are placeholders
for other letters, and these letters select which time belonging
to how reference is used for the comparison.
a The access time of the file reference
B The birth time of the file reference
c The inode status change time of reference
m The modification time of the file reference
t reference is interpreted directly as a time
add a comment |
find(1)
:
-newerXY reference
Compares the timestamp of the current file with reference. The
reference argument is normally the name of a file (and one of
its timestamps is used for the comparison) but it may also be a
string describing an absolute time. X and Y are placeholders
for other letters, and these letters select which time belonging
to how reference is used for the comparison.
a The access time of the file reference
B The birth time of the file reference
c The inode status change time of reference
m The modification time of the file reference
t reference is interpreted directly as a time
find(1)
:
-newerXY reference
Compares the timestamp of the current file with reference. The
reference argument is normally the name of a file (and one of
its timestamps is used for the comparison) but it may also be a
string describing an absolute time. X and Y are placeholders
for other letters, and these letters select which time belonging
to how reference is used for the comparison.
a The access time of the file reference
B The birth time of the file reference
c The inode status change time of reference
m The modification time of the file reference
t reference is interpreted directly as a time
answered Nov 25 '14 at 5:02
SailorCireSailorCire
1,8581921
1,8581921
add a comment |
add a comment |
find ./ -mtime +n
used to get all files older than n
daysfind ./ -mtime -n
used to get all files modified in last n
days
Now if you are using 1
in place of n
, you will get files modified in the last 24 hours. But what if you want only files from yesterday and not within the last 24 hours? Here newermt
comes into the picture.
find ./ -newermt "2016-01-18" ! -newermt '2016-01-19'
will give you all files which are newer than specified date and !
will exclude all files which are newer than the specified date. So the above command will give a list of files which were modified on 2016-01-18.
add a comment |
find ./ -mtime +n
used to get all files older than n
daysfind ./ -mtime -n
used to get all files modified in last n
days
Now if you are using 1
in place of n
, you will get files modified in the last 24 hours. But what if you want only files from yesterday and not within the last 24 hours? Here newermt
comes into the picture.
find ./ -newermt "2016-01-18" ! -newermt '2016-01-19'
will give you all files which are newer than specified date and !
will exclude all files which are newer than the specified date. So the above command will give a list of files which were modified on 2016-01-18.
add a comment |
find ./ -mtime +n
used to get all files older than n
daysfind ./ -mtime -n
used to get all files modified in last n
days
Now if you are using 1
in place of n
, you will get files modified in the last 24 hours. But what if you want only files from yesterday and not within the last 24 hours? Here newermt
comes into the picture.
find ./ -newermt "2016-01-18" ! -newermt '2016-01-19'
will give you all files which are newer than specified date and !
will exclude all files which are newer than the specified date. So the above command will give a list of files which were modified on 2016-01-18.
find ./ -mtime +n
used to get all files older than n
daysfind ./ -mtime -n
used to get all files modified in last n
days
Now if you are using 1
in place of n
, you will get files modified in the last 24 hours. But what if you want only files from yesterday and not within the last 24 hours? Here newermt
comes into the picture.
find ./ -newermt "2016-01-18" ! -newermt '2016-01-19'
will give you all files which are newer than specified date and !
will exclude all files which are newer than the specified date. So the above command will give a list of files which were modified on 2016-01-18.
edited Jan 26 at 13:28
abcd
32
32
answered Jan 18 '16 at 12:26
user152041user152041
7111
7111
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f169798%2fwhat-does-newermt-mean-in-find-command%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown