How to keep the timestamp of a folder when copying it

Discussion, questions and support.
Post Reply
Message
Author
chain
Posts: 2
Joined: 19.12.2022, 08:14

How to keep the timestamp of a folder when copying it

#1 Post by chain » 19.12.2022, 08:20

How to keep the timestamp of a folder when copying it?


chain
Posts: 2
Joined: 19.12.2022, 08:14

Re: How to keep the timestamp of a folder when copying it

#3 Post by chain » 20.12.2022, 03:22

Just what I want, thanks very much...

User avatar
shelby
Posts: 2
Joined: 19.12.2022, 14:30
Contact:

Re: How to keep the timestamp of a folder when copying it

#4 Post by shelby » 29.12.2022, 12:30

To keep the timestamp (i.e., the date and time at which a folder was created or last modified) of a folder when copying it, you can use the cp command with the -p option on Unix-like systems such as Linux and macOS.

For example, to copy the folder source_folder to destination_folder, preserving the timestamp, you can use the following command:
code "cp -p source_folder destination_folder"

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests