Saturday, October 25, 2014

Copy files with original timestamp in Linux commandline

If you move files on Linux with command mv, time-stamp won't be change, But if you copy with command cp, it'll take current time for time-stamp. If we wanna get original time-stamp, you can use following command on Linux,

cp -R -u -p /source /destination

What is time-stamp ?

When we create or modify file / directory, it'll store creation and / or modification date and time on file / directory properties. Which is called time-stamp.





No comments:

disable_functions with Easy Apache 4 and PHP-FPM

Recently I've faced the issue about disable_functions !!! I need to use 'shell_exec' for one of application with PHP. By de...