Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How can I change the timestamp for multiple folders and files in unraid?

Featured Replies

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.

touch

them.

 

 

 

  • 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

  • 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.

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

  • Author

The cheat sounds brilliant! I will test it tonight.

Thanks a lot Joe.

  • Author

Success. Thanks for the cheat, it worked...

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.