I have created a script to read 15 pcap files from a folder and merge then into one file using mergecap command. I want the merged file to have the creation time same as the first file of the 15 files and the last modified time same as the last 15th file. W.R.T Changing a file's "Date Created" and "Last Modified" attributes to another file's
I have got how to modify the file times, but this will change all file times to that of the first file. touch -m command needs to be used here , but I cant see how to save the last modified time from the last file and put this to to the merged file.