Modify creation and last modified date for entire subdir

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












This is only an issue because some antique software has Y2K issues, I need to move the file creation dates from 1990's to 2000 but for files across 21 subdirectories. A way to manage it recursively is what I'm looking for.



This ends up as an NFS share back to an MSDOS client and it appears to be using the creation date. Not the modified date, as I've tried the touch mod already with no success.










share|improve this question



















  • 1




    Have you looked at find -exec or a pipe to xargs? Both will issue a command on each file it finds.
    – tudor
    4 hours ago










  • Linux doesn't make it easy to see creation dates. doesn't keep creation dates. Are you sure you need to modify those?
    – terdon♦
    2 hours ago















up vote
1
down vote

favorite












This is only an issue because some antique software has Y2K issues, I need to move the file creation dates from 1990's to 2000 but for files across 21 subdirectories. A way to manage it recursively is what I'm looking for.



This ends up as an NFS share back to an MSDOS client and it appears to be using the creation date. Not the modified date, as I've tried the touch mod already with no success.










share|improve this question



















  • 1




    Have you looked at find -exec or a pipe to xargs? Both will issue a command on each file it finds.
    – tudor
    4 hours ago










  • Linux doesn't make it easy to see creation dates. doesn't keep creation dates. Are you sure you need to modify those?
    – terdon♦
    2 hours ago













up vote
1
down vote

favorite









up vote
1
down vote

favorite











This is only an issue because some antique software has Y2K issues, I need to move the file creation dates from 1990's to 2000 but for files across 21 subdirectories. A way to manage it recursively is what I'm looking for.



This ends up as an NFS share back to an MSDOS client and it appears to be using the creation date. Not the modified date, as I've tried the touch mod already with no success.










share|improve this question















This is only an issue because some antique software has Y2K issues, I need to move the file creation dates from 1990's to 2000 but for files across 21 subdirectories. A way to manage it recursively is what I'm looking for.



This ends up as an NFS share back to an MSDOS client and it appears to be using the creation date. Not the modified date, as I've tried the touch mod already with no success.







command-line files






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 31 mins ago

























asked 5 hours ago









A.Adverse

337




337







  • 1




    Have you looked at find -exec or a pipe to xargs? Both will issue a command on each file it finds.
    – tudor
    4 hours ago










  • Linux doesn't make it easy to see creation dates. doesn't keep creation dates. Are you sure you need to modify those?
    – terdon♦
    2 hours ago













  • 1




    Have you looked at find -exec or a pipe to xargs? Both will issue a command on each file it finds.
    – tudor
    4 hours ago










  • Linux doesn't make it easy to see creation dates. doesn't keep creation dates. Are you sure you need to modify those?
    – terdon♦
    2 hours ago








1




1




Have you looked at find -exec or a pipe to xargs? Both will issue a command on each file it finds.
– tudor
4 hours ago




Have you looked at find -exec or a pipe to xargs? Both will issue a command on each file it finds.
– tudor
4 hours ago












Linux doesn't make it easy to see creation dates. doesn't keep creation dates. Are you sure you need to modify those?
– terdon♦
2 hours ago





Linux doesn't make it easy to see creation dates. doesn't keep creation dates. Are you sure you need to modify those?
– terdon♦
2 hours ago











1 Answer
1






active

oldest

votes

















up vote
3
down vote













You can change the modification times of all files and directories under your target directory with:



find /target/dir -exec touch -m +


That will set the modification time to today. You can also set it to a specific date of your choosing:



find /target/dir -exec touch -m -d '1/1/2000' +


I really doubt you'd need to touch the creation date since they're not really used in Linux (see [1],[2],[3]) kernel doesn't even provide a way of accessing it easily.






share|improve this answer




















  • I'll give you the vote, it does do what I asked for, although it didn't immediately solve my problem. Should've thought of it first, I ended up having to modify the date via md-dos
    – A.Adverse
    18 mins ago










  • @A.Adverse what's missing? And what did you modify, was it the creation date? What's "md-dos"? Just a typo for ms-dos or something else?
    – terdon♦
    15 mins ago










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1083407%2fmodify-creation-and-last-modified-date-for-entire-subdir%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote













You can change the modification times of all files and directories under your target directory with:



find /target/dir -exec touch -m +


That will set the modification time to today. You can also set it to a specific date of your choosing:



find /target/dir -exec touch -m -d '1/1/2000' +


I really doubt you'd need to touch the creation date since they're not really used in Linux (see [1],[2],[3]) kernel doesn't even provide a way of accessing it easily.






share|improve this answer




















  • I'll give you the vote, it does do what I asked for, although it didn't immediately solve my problem. Should've thought of it first, I ended up having to modify the date via md-dos
    – A.Adverse
    18 mins ago










  • @A.Adverse what's missing? And what did you modify, was it the creation date? What's "md-dos"? Just a typo for ms-dos or something else?
    – terdon♦
    15 mins ago














up vote
3
down vote













You can change the modification times of all files and directories under your target directory with:



find /target/dir -exec touch -m +


That will set the modification time to today. You can also set it to a specific date of your choosing:



find /target/dir -exec touch -m -d '1/1/2000' +


I really doubt you'd need to touch the creation date since they're not really used in Linux (see [1],[2],[3]) kernel doesn't even provide a way of accessing it easily.






share|improve this answer




















  • I'll give you the vote, it does do what I asked for, although it didn't immediately solve my problem. Should've thought of it first, I ended up having to modify the date via md-dos
    – A.Adverse
    18 mins ago










  • @A.Adverse what's missing? And what did you modify, was it the creation date? What's "md-dos"? Just a typo for ms-dos or something else?
    – terdon♦
    15 mins ago












up vote
3
down vote










up vote
3
down vote









You can change the modification times of all files and directories under your target directory with:



find /target/dir -exec touch -m +


That will set the modification time to today. You can also set it to a specific date of your choosing:



find /target/dir -exec touch -m -d '1/1/2000' +


I really doubt you'd need to touch the creation date since they're not really used in Linux (see [1],[2],[3]) kernel doesn't even provide a way of accessing it easily.






share|improve this answer












You can change the modification times of all files and directories under your target directory with:



find /target/dir -exec touch -m +


That will set the modification time to today. You can also set it to a specific date of your choosing:



find /target/dir -exec touch -m -d '1/1/2000' +


I really doubt you'd need to touch the creation date since they're not really used in Linux (see [1],[2],[3]) kernel doesn't even provide a way of accessing it easily.







share|improve this answer












share|improve this answer



share|improve this answer










answered 1 hour ago









terdon♦

62.5k12131208




62.5k12131208











  • I'll give you the vote, it does do what I asked for, although it didn't immediately solve my problem. Should've thought of it first, I ended up having to modify the date via md-dos
    – A.Adverse
    18 mins ago










  • @A.Adverse what's missing? And what did you modify, was it the creation date? What's "md-dos"? Just a typo for ms-dos or something else?
    – terdon♦
    15 mins ago
















  • I'll give you the vote, it does do what I asked for, although it didn't immediately solve my problem. Should've thought of it first, I ended up having to modify the date via md-dos
    – A.Adverse
    18 mins ago










  • @A.Adverse what's missing? And what did you modify, was it the creation date? What's "md-dos"? Just a typo for ms-dos or something else?
    – terdon♦
    15 mins ago















I'll give you the vote, it does do what I asked for, although it didn't immediately solve my problem. Should've thought of it first, I ended up having to modify the date via md-dos
– A.Adverse
18 mins ago




I'll give you the vote, it does do what I asked for, although it didn't immediately solve my problem. Should've thought of it first, I ended up having to modify the date via md-dos
– A.Adverse
18 mins ago












@A.Adverse what's missing? And what did you modify, was it the creation date? What's "md-dos"? Just a typo for ms-dos or something else?
– terdon♦
15 mins ago




@A.Adverse what's missing? And what did you modify, was it the creation date? What's "md-dos"? Just a typo for ms-dos or something else?
– terdon♦
15 mins ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1083407%2fmodify-creation-and-last-modified-date-for-entire-subdir%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

List of Gilmore Girls characters

Confectionery