April 30, 201214 yr I made a schoolboy's error. I was running low on one of my disks, and decided to move a batch of folders containing some of the movie information (i.e backdrop, cover, movies.xml etc), to a different drive, to free up space. I use mediabrowser, and now all of those films (which were very old) show up as "latest movies". I guess that moving files from one drive to another has updated the "created date" for all of those files. Is there any way I can: - restore the initial date those files were crated in the original drive - change the filedate for all the folders and files to a date in the past (like 1.1.2009), so they don't appear in front of the latest movies I transferred to my unraid server Thanks for yur help in advance.
May 1, 201214 yr Author Thanks for the tip. Supposing I move all the folders containing the modified files in questions on a new empty drive, disk13, and that I want to change the timestamp to the first of January 2009, what is the command line I need to type after I log on to the root, via telnet? I want to make sure that the command changes the date for all the files contained in all the folders contained in the "movies" folder The folder structure is \\tower\disk13\unraid\movies Thanks for your help! Ivan
May 1, 201214 yr Author Thanks, I understand I should use the "touch" command. I just don't know how. Any help is appreciated. I have no unix experience, I use unraid purely as music and movie repository, running with no customizations.
May 1, 201214 yr Thanks, I understand I should use the "touch" command. I just don't know how. Any help is appreciated. I have no unix experience, I use unraid purely as music and movie repository, running with no customizations. Cheat. 1. Set server date to 2009. reboot. 2. move files once more to a different disk. If needed, you can then also move them back. A move within the same disk is NOT the same. It will not change the create time as it only renames the file. A move to a different disk will copy the file to the new disk (setting the create time) and then delete the original. 3. reset date back to current. reboot. It might NOT be possible without cheating. Each file/directory in Linux has three time-stamps. The create time. The last modification time. (when last changed. or same as creation time if never changed since) The last access time. (last time read or written) The "touch" command can only change the modification and access time. Nothing (unless you cheat as above) can change the creation time. The manual page for the "touch" command is: http://www.manpagez.com/man/1/touch/ You can change all the files under a directory to 1/1/2009 at 12 noon by typing find /mnt/user/sharename -type f -print | xargs touch -A -t 200901011200 to change a single file type: touch -A -t 200901011200 /full/path/to/file or, if in the current directory touch -A -t 200901011200 filename
Archived
This topic is now archived and is closed to further replies.