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 to move files/folders from one physical disk to another?

Featured Replies

As I increase my storage, I am also reorganizing what types of files sit on which disk.  Obviously, performing the move from a networked PC takes forever as it copies down then back up over the network.  What I would like is to move it from one disk to another directly.

 

Hopefully, this won't turn into a debate on whether I really need to move the files or not...  Everyone here uses their server a little bit differently, and I am very happy with how I am using unRAID.  :)

 

My problems?  I am a linux noob, and my unRAID server is normally headless.  So I think I need 2 things:  first, is there a way to remote into the server console?  Second, (assuming yes to the first question), can someone provide the steps I would need to do something like this:

 

move:

 

\\tower\disk1\movies\enchanted

 

to

 

\\tower\disk3\bluray\enchanted

 

 

I really appreciate any assistance.

Get a program that lets you telnet (putty should work fine).  You need to telnet to your unRAID server, simply using "tower" as the name should work (if not, then find the ip address and use that).  Login as root, no password (unless you set one for root).  Then type this command:

 

mv /mnt/disk1/movies/enchanted /mnt/disk3/bluray/

 

Note that there is a space after "mv" and "enchanted".  The bluray folder must already exist.  Here's a few other pointers:

 

You may want to just copy the files over, make sure they still work, then delete the original.  To do so:

 

cp -rf /mnt/disk1/movies/enchanted /mnt/disk3/bluray/

 

Once you're sure that the copied files work, do this (and be extremely careful, you can easily delete everything you have with the wrong command, you may just want to delete in Windows Explorer):

 

rm -rf /mnt/disk1/movies/enchanted

 

As before the bluray folder on the destination disk must already exist.

 

If any of your files have spaces in them, you need to either escape them or put quotations around them.  An example:

 

 

mv "/mnt/disk1/movies/enchanted movie" "/mnt/disk3/bluray movies"

of course it is much easier, after you telnet (I STRONGLY propose putty) and login, to just type "mc" and use a nice environment to make your moves

 

 

  • Author

I'll go find putty.  This is *exactly* the type of info I was looking for guys.  Thanks!

with putty and mc you can even use your mouse :)

 

...also since I mentioned mc and putty, I don't know if people have realized it, but if you resize putty window (with the mouse), mc reacts nicely and refits the new size :)

 

 

The move (mv) command requires that your telnet (putty) session remains open until the commad finishes.  If you want to start the process and then shutdown your computer, you can use the "nohup" command as follows:

 

nohup  mv  /mnt/disk1/movies/enchanted/*  /mnt/disk3/bluray  &

 

After entering this command you will immediately get back to your command prompt.  But the "mv" command is running in the background.

 

It will create a file called "nohup.out" with the output of the command (usually empty).  I do this and then do a quick check to make sure that the files are starting to appear on the destination disk.  I then exit my telnet session, shutdown the computer, and go to bed.  It will keep running until complete.

FYI, if you try the 'mc' command for midnight commander be aware that it is only included with the 4.3 beta's.  If you're running an earlier version you'll need to either upgrade to the beta or manually install mc.

 

Also, if you use the -r switch with mv it should recursively move all subfolders as well:

 

"mv -r source_folder dest_folder &"

The "-r" is not needed for a mv operation (it may not even be valid).  It moves the entire directory including all subfolders by default.  It is the "cp" command that needs the "-r" to do a recursive copy.

Thanks for the link!  I learned a few things.  I only know about a few unix commands, but mv is one I use alot.  Hope you keep contributing!

 

What I'd really like to know is how to move files and directories and keep the date/time stamp on the DIRECTORY entries, and not just the files.  When I move some old backups, I'd really like to keep the timestamps on the whole tree.

 

 

I don't know if you can save timestams on directories.

I thnk if you wanted that you might need to use a real backup program like tar and cpio and even then I'm not sure.

I know tar can restore a directory state if files have changed from when it was backed and restored, but I'm still unsure if it will restore the timestamp of a directory.

This may be a stupid question, but I know nothing about linux. Why can't you just open a window in windows and drag the files over from disk 1 to disk 3? If you do that will it go through the computer you're on and not do just disk to disk? Thanks.

This may be a stupid question, but I know nothing about linux. Why can't you just open a window in windows and drag the files over from disk 1 to disk 3? If you do that will it go through the computer you're on and not do just disk to disk? Thanks.

 

Not a stupid question, it's been a topic of discussion around here before.  See the following threads for more info.

http://lime-technology.com/forum/index.php?topic=1696.0

http://lime-technology.com/forum/index.php?topic=1266.0

This may be a stupid question, but I know nothing about linux. Why can't you just open a window in windows and drag the files over from disk 1 to disk 3? If you do that will it go through the computer you're on and not do just disk to disk? Thanks.

You can do exactly that, and I do it all the time.  But the data moves across the network (first from the unRAID server to your workstation, and then from your workstation back to the unRAID server).  Running a native command on the unRAID server means that your computer is out of the exchange.  Data can move faster if it doesn't have to go on your network.  If you're moving lots of data you would notice the difference.  If its just a gig or two, just drag and drop from Windows.

Thanks that's what I thought.

  • Author

Well, I downloaded PuTTY, and even briefly tried Midnight Commander (MC).  Then I saved all the instructions with the helpful syntax for move/copy/delete, and I should be good to go when my newest hard drive shows up tomorrow.  Thanks guys!

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.