[SOLVED] Move files from one disk to another


Recommended Posts

I'd do it from a telnet/putty session. Do it in "screen" otherwise it will time out and stop.

 

mkdir /mnt/disk4/TV\ Shows

mv -v /mnt/disk1/TV\ Shows/* /mnt/disk4/TV\ Shows

 

 

two questions?? 

Do I have to make the directory TV Shows if it's there already?

If I do it from the server itself do I still need to use screen?

Link to comment

Correct / Correct

 

Note that the "-v" on the "mv" command stands for verbose. It results is it showing each file as it is moved. This is handy if ever you are wondering if it is still working!

 

Should go fine. I do this type of thing all of the time.

 

BTW, some people prefer to copy rather than move, and then delete the source only after the copy is verified.

 

The syntax of cp, is similar to mv, but the switches are a little difference.

 

cp -Rpv /source/* /target

 

-R = recurse subdirectories

-p = preserve permissions

-v = verbose (same as mv)

 

Welcome to the Linux command line. :)

Link to comment

One thing to be aware of is that you may mess up the permissions during the copy.  If so you should run a command like

newperms /mnt/disk4

when you have completed the copy to ensure they are set correctly.

 

Can't I just run the new permissions script in unraid?

Sure. It will process the whole server instead of just disk4, so it will take longer, but it will accomplish the same thing.
Link to comment

I have not had permission problem when using mv or cp (with the preserve permissions flag). Newperms is a good solution if you do have problems, but I expect you will not need to use it.

 

I need to experiment with rsync. Thanks for posting MyK.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.