Modify creation and last modified date for entire subdir
Clash 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.
command-line files
add a comment |Â
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.
command-line files
1
Have you looked atfind -exec
or a pipe toxargs
? 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
add a comment |Â
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.
command-line files
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
command-line files
edited 31 mins ago
asked 5 hours ago


A.Adverse
337
337
1
Have you looked atfind -exec
or a pipe toxargs
? 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
add a comment |Â
1
Have you looked atfind -exec
or a pipe toxargs
? 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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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.
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
add a comment |Â
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
add a comment |Â
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
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
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
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
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
1
Have you looked at
find -exec
or a pipe toxargs
? 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