What's new

Linux noob, move command syntax

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Andrew.L

Occasional Visitor
I need to move over 100k files from each of several directories. Select-all + drag-and-drop sometimes fails. I'd prefer to set a task, but for some reason I can't get the move command to work. What am I doing wrong (see examples below). I'm tying to move the files from the "13" directory up to the "Audits" directory. I've tried...

Code:
mv /volume1/Audits/CVS_Images/20180612/1190/13/*.* volume1/Audits/CVS_Images
and
mv /volume1/Audits/CVS_Images/20180612/1190/13/*.* ../../../

Plus the different variations of slashes before or not before "volume1".

Thanks,
Andrew
 
Try:

mv /volume1/Audits/CVS_Images/20180612/1190/13/* /volume1/Audits/CVS_Images

This puts the files in the CVS_Images directory not Audits. It was unclear exactly which destination you wanted.
 
No. That didn't do it either. Could it be because I have dashes or underscores in the directory names? To not show my client's name, I removed that part of the directory name in my initial post. The shared directory is actually "AuditType-Audits_ClientName-Client".
 
Dashes or underscores shouldn't be a problem. Make sure you don't have any other unusual characters, particularly apostrophes.

How are you issuing the command? If you're doing it from a command line you should be able to see any error messages if there's a problem.

It might not be a problem with the command at all. It might be a permissions problem or something.
 
Dashes or underscores shouldn't be a problem. Make sure you don't have any other unusual characters, particularly apostrophes.

How are you issuing the command? If you're doing it from a command line you should be able to see any error messages if there's a problem.

It might not be a problem with the command at all. It might be a permissions problem or something.

Thanks.

No special characters or spaces. I'm issuing the command in Task Scheduler. I've tried it both as root and alindsay (an admin). The router is new. I'll have to learn how to execute code from the command line. I haven't tried that yet.
 
I created a new set of directories and a few test files. The mv command worked just fine. I can only surmise that it was the large number of files that caused the issue. I'll be doing this again, so I'd really like to find out how to move over 100k files at a time.

Anyway, the following worked.
Code:
mv /volume1/Fagan_General/Toss_Me/TossMeToo/*.bob /volume1/Fagan_General/Toss_Me
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top