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.

Moving files within - requesting quick check of my commands so I don't screw up

Featured Replies

I'll keep this brief.  My goal is to move all of my contents of Disc 6 (500gb drive) to Disc 3 (2 tb drive).  The goal being to make Disc 6 a Cache drive.

 

Disc 6 file structure has

"Movies"

"Random"

"Pictures"

 

Disc 3 has:

"Movies"

"Random"

 

I looked at the Wiki and this seems to be the method I want:

 

"Wildcards

Wildcards are available as well. For example, if you want to copy all of the files from Disk 2 over to Disk 3, use the mv command like this:

 

mv /mnt/disk2/* /mnt/disk3

In this example, all files and folders on Disk 2 would be relocated over to Disk 3 in the exact same folder structure as it was on Disk 2"

 

So at the command prompt type:

mv /mnt/disk6/* /mnt/disk3

 

Am I correct that this will move all the contents of Disc 6 to Disk 3 and the movies will be automatically put in the "movies" folder on Disc 3.  Also, it will not erase any of the movies already in the "movies" folder in disc 3?

 

Thanks for checking to make sure I don't make a mistake!!

 

 

 

I would use mc to copy files around. Also, using cp might be better than mv as you can check everything has copied without problems before deleting from the original source.

You want cp so you can use its -p option to maintain ownership and dates/times. Then when you're happy delete the source files.

 

Format would be:

 

cp -rp /mnt/disk2/* /mnt/disk3/    that's cp space -rp space /mnt/disk2/* space /mnt/disk3/

 

later: (be vewy caweful)

 

rm -r /mnt/disk2/*

 

  • Author

Ok, so for me it would be

 

cp -rp /mnt/disk6/* /mnt/disk3/

 

Then after its done:

 

rm -r /mnt/disk6/*

 

What does that last line do?  Erase the drive?

rm is the unix delete. The -r options says do it recursively, hence the need for caution.

 

rm --help would display the other options.

  • Author

Hmm recursively, not sure what that means, but I guess the bottom line is I will make sure that everything is backed up before I delete it.

 

Thanks for your help!

 

 

The effect of recursion here is that everything beneath the target gets deleted; it follows directories to the furthest level, deleting everything. Without the -r it would not follow directories.

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.